mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 12:40:10 +00:00
css-overview: Elaborate how color expressions work
This commit is contained in:
parent
98fe7f5b5c
commit
76eb8e3e98
@ -582,9 +582,14 @@ background-color: @bg_color;
|
|||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
GTK+ also allows to form color expressions, which can be nested and
|
GTK+ also supports color expressions, which allow colors to be transformed
|
||||||
provide a rich language to define colors which are derived from a
|
to new ones and can be nested, providing a rich language to define colors.
|
||||||
set of base colors.
|
</para>
|
||||||
|
<para>
|
||||||
|
Color expressions resemble functions, taking 1 or more colors and in some
|
||||||
|
cases a number as their arguments. The number is floating-point, clamped
|
||||||
|
between 0 and 1, and specifies the degree to which the expression will
|
||||||
|
transform the given color(s) in the manner that is indicated by its name.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<literallayout><code>〈color expression〉 = lighter(〈color〉) | darker(〈color〉) | shade(〈color〉,〈number〉) | alpha(〈color〉,〈number〉) | mix(〈color〉,〈color〉,〈number〉)</code>
|
<literallayout><code>〈color expression〉 = lighter(〈color〉) | darker(〈color〉) | shade(〈color〉,〈number〉) | alpha(〈color〉,〈number〉) | mix(〈color〉,〈color〉,〈number〉)</code>
|
||||||
|
Loading…
Reference in New Issue
Block a user