2#include <NDEVR/RGBColor.h>
3#include <NDEVR/Buffer.h>
4#include <NDEVR/Bounds.h>
5#include <NDEVR/Dictionary.h>
90 static ColorMap s_color_dictionary;
98 return getColorInfo(hue.
toTypeAngle<
sint04>())[ColorRangeType::e_saturation_range][0];
104 static Bounds<1, sint04> getHueRange(
int colorInput);
109 static Bounds<1, sint04> getHueRange_s(RandomColorOptions::HueStyle colorInput);
114 sint04 randomWithin(
const Bounds<1, sint04>& range)
const;
118 Angle<uint02> pickHue()
const;
123 Dictionary<ColorRangeType, Buffer<Bounds<1, sint04>>> getColorInfo(Angle<sint04> hue)
const;
128 uint01 pickSaturation(
const Angle<uint02>& hue)
const;
134 uint01 getMinimumBrightness(
const Angle<uint02>& H, uint01 S)
const;
140 uint01 pickBrightness(
const Angle<uint02>& H, uint01 S)
const;
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
constexpr Angle< t_new_type > toTypeAngle() const
Explicit conversion of an angle from one container type to another.
A specification of upper and lower bounds in N-dimensions.
The equivelent of std::vector but with a bit more control.
A hash-based key-value store, useful for quick associative lookups.
Represents a color in the RGB space with optional alpha transparency.
RandomColorGenerator(const RandomColorOptions &opt)
Constructs a generator with the specified options.
void setOptions(RandomColorOptions &ops)
Replaces the current color generation options.
Buffer< RGBColor > randomColors(uint04 count) const
Generates a buffer of random RGB colors.
RandomColorGenerator()
Constructs a generator with default options.
RGBColor randomColorRGB() const
Generates a single random RGB color based on the current options.
static ColorMap LoadColorBounds()
Loads and returns the predefined color bounds dictionary for all hue styles.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
Options for configuring random color generation with custom hue and brightness constraints.
RandomColorOptions(HueStyle hue, LuminosityStyle style)
Constructs random color options with the given hue and luminosity style.
int hue
Numeric hue value override, or Constant<int>::Invalid if unset.
HueStyle hue_name
The named hue family constraint.
RandomColorOptions()
Constructs default random color options.
LuminosityStyle
Controls the brightness level of generated colors.
@ e_random
Randomly selected brightness.
@ e_light
Light, pastel-like colors.
@ e_dark
Dark, muted colors.
@ e_bright
Bright, vivid colors.
HueStyle
Constrains the hue family for generated colors.
@ e_purple
Purple hue family.
@ e_orange
Orange hue family.
@ e_yellow
Yellow hue family.
@ e_green
Green hue family.
@ e_unset
No hue constraint; any hue may be chosen.
@ e_monochrome
Grayscale with no chromatic hue.
size_t seed
Seed for the random number generator.
LuminosityStyle luminosity
The desired luminosity style.