1
Fork 0
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:
Andreas Kling 2019-03-18 04:53:09 +01:00
parent c24d4b07db
commit f4b8e4966f
2 changed files with 8 additions and 0 deletions

View file

@ -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) { }