Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBColor Class Reference

TBColor contains a 32bit color. More...

#include <tb_color.h>

Public Member Functions

 TBColor (uint8_t r_, uint8_t g_, uint8_t b_, uint8_t a_=255)
 
 TBColor (uint32_t bgra_)
 
void Set (const TBColor &color)
 
void SetFromString (const TBStr &str)
 Set the color from string in any of the following formats: "#rrggbbaa", "#rrggbb", "#rgba", "#rgb".
 
void GetString (TBStr &str) const
 Write color to string with format #rrggbbaa.
 
 operator uint32_t () const
 

Public Attributes

union {
   struct {
      uint8_t   b
 
      uint8_t   g
 
      uint8_t   r
 
      uint8_t   a
 
   } 
 
   uint32_t   bgra
 
}; 
 

Detailed Description

TBColor contains a 32bit color.


The documentation for this class was generated from the following files: