Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
utils.hpp File Reference

Manipulate color representations. More...

Go to the source code of this file.

Classes

struct  lampda::modes::colors::ToRGB
 Exposes (r, g, b) as uint8_t in struct from a single uint32_t color. More...
 

Namespaces

namespace  lampda
 Program scope.
 
namespace  lampda::modes
 Contains basic interface types to implement custom user modes.
 
namespace  lampda::modes::colors
 Tools to manipulate colors and their representation.
 

Functions

static constexpr LMBD_INLINE uint32_t lampda::modes::colors::fromRGB (uint8_t r, uint8_t g, uint8_t b)
 Return color (r, g, b) as a single uint32_t integer.
 
static constexpr LMBD_INLINE uint32_t lampda::modes::colors::fromGrey (uint32_t w)
 Return color (w, w, w) as a single uint32_t integer.
 
static constexpr LMBD_INLINE uint32_t lampda::modes::colors::fromAngleHue (uint16_t angleDegrees)
 Given a 360 degrees angle, return a corresponding color as an integer.
 
static uint32_t lampda::modes::colors::blend (uint32_t leftColor, uint32_t rightColor, uint16_t blend, bool b16=false)
 blend to two colors
 
template<bool isVideoMode = false>
static uint32_t lampda::modes::colors::fade (uint32_t inputColor, uint8_t fadeAmount)
 fade the color toward black
 
template<bool isFast = false>
uint32_t lampda::modes::colors::add (uint32_t c1, uint32_t c2)
 Add two colors together.
 

Variables

static constexpr uint8_t lampda::modes::colors::colorRotation [360]
 precompiled table for Hue
 

Detailed Description

Manipulate color representations.