mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +00:00
SharedGraphics: Add Color::to_string().
This generates a string in the format "rgba(%d, %d, %d, %d)".
This commit is contained in:
parent
c24d4b07db
commit
f4b8e4966f
2 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
typedef dword RGBA32;
|
||||
|
@ -66,6 +67,8 @@ public:
|
|||
|
||||
RGBA32 value() const { return m_value; }
|
||||
|
||||
String to_string() const;
|
||||
|
||||
private:
|
||||
explicit Color(RGBA32 rgba) : m_value(rgba) { }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue