You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dyon supports HTML hex colors, e.g. #aaffcc, directly in the syntax. This is converted automatically into vec4 with color components (r/255, g/255, b/255, a/255).
Without alpha:
#aaffcc // alpha is 1
With alpha:
#aaffcc00 // alpha is 0
This is designed for:
Easier copying colors from image editors
Recognize color settings in meta data syntax, for example a tool to tweak colors while running
Notice
The normal color space for image editors is sRGB. When doing interpolation with colors, use srgb_to_linear_color and convert back to sRGB with linear_to_srgb_color.
Example:
a := srgb_to_linear(color: #ff0000)
b := srgb_to_linear(color: #00ff00)
t := 0.5
c := linear_to_srgb(color: t * a + (1-t)* b)
The text was updated successfully, but these errors were encountered:
Dyon supports HTML hex colors, e.g.
#aaffcc
, directly in the syntax. This is converted automatically intovec4
with color components(r/255, g/255, b/255, a/255)
.Without alpha:
#aaffcc // alpha is 1
With alpha:
#aaffcc00 // alpha is 0
This is designed for:
Notice
The normal color space for image editors is sRGB. When doing interpolation with colors, use
srgb_to_linear_color
and convert back to sRGB withlinear_to_srgb_color
.Example:
The text was updated successfully, but these errors were encountered: