yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui::Color Struct Reference

#include <color.h>

Classes

struct  HSL
 

Public Member Functions

 operator ImVec4 () const
 
HSL ToHSL () const
 
Color WithHue (float new_hue) const
 
Color WithSaturation (float new_sat) const
 
Color WithLightness (float new_light) const
 
Color Lighter (float amount) const
 
Color Darker (float amount) const
 
Color Saturate (float amount) const
 
Color Desaturate (float amount) const
 
Color ShiftHue (float degrees) const
 
Color WithAlpha (float new_alpha) const
 

Static Public Member Functions

static Color FromHSL (float h, float s, float l, float a=1.0f)
 

Public Attributes

float red = 0.0f
 
float green = 0.0f
 
float blue = 0.0f
 
float alpha = 1.0f
 

Detailed Description

Definition at line 16 of file color.h.

Member Function Documentation

◆ operator ImVec4()

yaze::gui::Color::operator ImVec4 ( ) const
inline

Definition at line 22 of file color.h.

References alpha, blue, green, and red.

◆ ToHSL()

◆ FromHSL()

static Color yaze::gui::Color::FromHSL ( float h,
float s,
float l,
float a = 1.0f )
inlinestatic

◆ WithHue()

Color yaze::gui::Color::WithHue ( float new_hue) const
inline

Definition at line 87 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::l, yaze::gui::Color::HSL::s, and ToHSL().

Here is the call graph for this function:

◆ WithSaturation()

Color yaze::gui::Color::WithSaturation ( float new_sat) const
inline

Definition at line 92 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::h, yaze::gui::Color::HSL::l, and ToHSL().

Here is the call graph for this function:

◆ WithLightness()

Color yaze::gui::Color::WithLightness ( float new_light) const
inline

Definition at line 97 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::h, yaze::gui::Color::HSL::s, and ToHSL().

Here is the call graph for this function:

◆ Lighter()

Color yaze::gui::Color::Lighter ( float amount) const
inline

Definition at line 102 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::h, yaze::gui::Color::HSL::l, yaze::gui::Color::HSL::s, and ToHSL().

Referenced by yaze::gui::ThemeManager::GenerateThemeFromAccent().

Here is the call graph for this function:

◆ Darker()

Color yaze::gui::Color::Darker ( float amount) const
inline

Definition at line 107 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::h, yaze::gui::Color::HSL::l, yaze::gui::Color::HSL::s, and ToHSL().

Referenced by yaze::gui::ThemeManager::GenerateThemeFromAccent().

Here is the call graph for this function:

◆ Saturate()

Color yaze::gui::Color::Saturate ( float amount) const
inline

Definition at line 112 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::h, yaze::gui::Color::HSL::l, yaze::gui::Color::HSL::s, and ToHSL().

Here is the call graph for this function:

◆ Desaturate()

Color yaze::gui::Color::Desaturate ( float amount) const
inline

Definition at line 117 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::h, yaze::gui::Color::HSL::l, yaze::gui::Color::HSL::s, and ToHSL().

Referenced by yaze::gui::ThemeManager::GenerateThemeFromAccent().

Here is the call graph for this function:

◆ ShiftHue()

Color yaze::gui::Color::ShiftHue ( float degrees) const
inline

Definition at line 122 of file color.h.

References alpha, FromHSL(), yaze::gui::Color::HSL::h, yaze::gui::Color::HSL::l, yaze::gui::Color::HSL::s, and ToHSL().

Referenced by yaze::gui::ThemeManager::GenerateThemeFromAccent().

Here is the call graph for this function:

◆ WithAlpha()

Color yaze::gui::Color::WithAlpha ( float new_alpha) const
inline

Definition at line 129 of file color.h.

References blue, green, and red.

Referenced by yaze::gui::ThemeManager::GenerateThemeFromAccent().

Member Data Documentation

◆ red

◆ green

◆ blue

◆ alpha


The documentation for this struct was generated from the following file: