Skip to content

Commit 504adf8

Browse files
committed
add doc for new Color methods
1 parent c3ed272 commit 504adf8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/Color.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,28 @@ constexpr Color(uint32_t rgb, uint8_t a = 255); <3>
3939
<2> Constructor with `r`, `g`, `b` and optionally `a` initializers.
4040
<3> Constructor with an link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet[hex triplet] and an alpha channel
4141

42+
=== `to_hex`
43+
44+
[source]
45+
----
46+
constexpr uint32_t to_hex() const;
47+
----
48+
49+
Transform the color into an hex triplet with an alpha channel.
50+
51+
See also: <<to_rgba32>>
52+
53+
=== `to_rgba32`
54+
55+
[source]
56+
----
57+
constexpr std::array<uint8_t, 4> to_rgba32() const;
58+
----
59+
60+
Transform the color in an array of four 8-bit channels.
61+
62+
See also: <<to_hex>>
63+
4264
== Operators
4365

4466
=== `operator==`

0 commit comments

Comments
 (0)