View Issue Details

IDProjectCategoryView StatusLast Update
0002756NoesisGUIUnitypublic2024-01-22 14:06
Reporteraliagha.huseynli Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product Version3.2.2 
Target Version3.2.3Fixed in Version3.2.3 
Summary0002756: My Color style didn't work on Unity
Description

My style code:
<!--#region Colors-->
<SolidColorBrush x:Key="TextColor_FFFDEF" Color="#FFFDEF" />
<SolidColorBrush x:Key="TextColor_E1E1E1" Color="#E1E1E1" />
<SolidColorBrush x:Key="TextColor_D9D9D9" Color="#D9D9D9" />
<SolidColorBrush x:Key="TextColor_FFB629" Color="#FFB629" />
<SolidColorBrush x:Key="TextColor_86A5A1" Color="#86A5A1" />
<SolidColorBrush x:Key="TextColor_1FEFDB" Color="#1FEFDB" />
<SolidColorBrush x:Key="TextColor_B3AD88" Color="#B3AD88" />
<SolidColorBrush x:Key="TextColor_FFFFFF" Color="#FFFFFF" />
<SolidColorBrush x:Key="TextColor_1C9E92" Color="#1C9E92" />
<SolidColorBrush x:Key="TextColor_B3B3B3" Color="#B3B3B3" />
<SolidColorBrush x:Key="TextColor_D04545" Color="#D04545" />
<SolidColorBrush x:Key="TextColor_FFFDF1" Color="#FFFDF1" />
<SolidColorBrush x:Key="TextColor_9A9A9A" Color="#9A9A9A" />
<!--#endregion-->
<Style x:Key="Josefin_Regular_28" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="28" />
<Setter Property="FontFamily" Value="Josefin Sans" />
<Setter Property="FontWeight" Value="Regular" />
<Setter Property="Width" Value="Auto" />
<Setter Property="Height" Value="Auto" />
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="LineHeight" Value="28" />
<Setter Property="LineStackingStrategy" Value="BlockLineHeight" />
<Setter Property="Foreground" Value="{StaticResource TextColor_E1E1E1}" />
<Setter Property="Opacity" Value="100" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}, Path=IsMouseOver}" Value="True">
<Setter Property="FontWeight" Value="Regular" />
</DataTrigger>
</Style.Triggers>
</Style>
Here is my view xaml code:
<TextBlock
Foreground="{StaticResource TextColor_FFB629}"
Style="{StaticResource Josefin_Regular_28}"
Text="SHIP SELECTION" />

Steps To Reproduce

To reproduce it please follow my codes I shared above.
Add styles and apply it textblock
every style will apply unless my yellow color. I tried different colors(Red, Black, Green, Blue etc) as well and they work properly, I didn't get why this piece of hex color didn't work.
Please be advised that I am able to see this color in WPF runtime. But I can't see in my Unity project

Attached Files
PlatformAny

Activities

aliagha.huseynli

aliagha.huseynli

2023-10-24 13:07

reporter   ~0008874

Also, this color is not seen on the Unity scene: #86A5A1

sfernandez

sfernandez

2023-10-24 13:43

manager   ~0008875

I was able to identify the source of the problem, it is related to the Opacity property setter.
It has a value of 100 when the valid range should be from 0 to 1, and because of how our shaders interpret the alpha the color gets burned (becomes white).
We need to coerce that value to the valid range in order to avoid this problem, we will fix it.

aliagha.huseynli

aliagha.huseynli

2023-10-25 08:58

reporter   ~0008880

Thanks, great. Your solution helped me. ))

Issue History

Date Modified Username Field Change
2023-10-24 09:53 aliagha.huseynli New Issue
2023-10-24 09:53 aliagha.huseynli File Added: Screenshot 2023-10-24 115116.png
2023-10-24 09:53 aliagha.huseynli File Added: Screenshot 2023-10-24 115147.png
2023-10-24 11:02 jsantos Assigned To => sfernandez
2023-10-24 11:02 jsantos Status new => assigned
2023-10-24 11:02 jsantos Target Version => 3.2.3
2023-10-24 13:07 aliagha.huseynli Note Added: 0008874
2023-10-24 13:43 sfernandez Status assigned => feedback
2023-10-24 13:43 sfernandez Note Added: 0008875
2023-10-25 08:58 aliagha.huseynli Note Added: 0008880
2023-10-25 08:58 aliagha.huseynli Status feedback => assigned
2024-01-22 11:47 sfernandez Target Version 3.2.3 => 3.2.4
2024-01-22 12:02 sfernandez Target Version 3.2.4 => 3.2.3
2024-01-22 14:06 sfernandez Status assigned => resolved
2024-01-22 14:06 sfernandez Resolution open => fixed
2024-01-22 14:06 sfernandez Fixed in Version => 3.2.3
2025-10-10 13:29 jsantos Category Unity3D => Unity