Spectrum<T extends RayWithLuminance<Ray> > class
Color scheme with harmonious relationships and accessibility features.
Constructors
-
Spectrum({required T source, required Map<
RayTone, RayWithLuminance< spectrum})Ray> > -
Creates scheme with explicit properties.
const
Properties
- accent100 → T?
-
no setter
- accent200 → T?
-
no setter
- accent400 → T?
-
no setter
- accent700 → T?
-
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shade0 → T?
-
Access tones using Material Design naming convention
no setter
- shade100 → T?
-
no setter
- shade1000 → T?
-
no setter
- shade200 → T?
-
no setter
- shade300 → T?
-
no setter
- shade400 → T?
-
no setter
- shade50 → T?
-
no setter
- shade500 → T?
-
no setter
- shade600 → T?
-
no setter
- shade700 → T?
-
no setter
- shade800 → T?
-
no setter
- shade900 → T?
-
no setter
- shade950 → T?
-
no setter
- source → T
-
The primary color this scheme is based on
final
-
spectrum
→ Map<
RayTone, RayWithLuminance< Ray> > -
Complete tonal palette with cached luminance.
final
- surfaceDark → T
-
Darker surface variant (shade700).
no setter
- surfaceLight → T
-
Lighter surface variant (shade100).
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
tone(
RayTone tone) → T? - Access specific tone by RayTone enum
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromOklchTones(
{Ray? base, required Map< RayTone, Ray> tones}) → Spectrum<RayWithLuminance< RayOklch> > - Creates an Oklch-based scheme from tone map
-
fromRay(
Ray ray, {bool? generateAccents}) → Spectrum< RayWithLuminance< Ray> > - Creates a scheme with the appropriate type based on the input ray's color space Returns Spectrum<RayWithLuminance<RayRgb8>> for RGB/HSL rays Returns Spectrum<RayWithLuminance<RayOklch>> for Oklch rays
-
fromRgbTones(
{Ray? base, required Map< RayTone, Ray> tones}) → Spectrum<RayWithLuminance< RayRgb8> > - Creates a RGB-based scheme from tone map