Skip to content

Design a non-ad-hoc way for color-to-color conversions #291

@jdahlstrom

Description

@jdahlstrom

Currently there's an assortion of conversion methods, including:

  • to_rgba for Color3<Rgb> -> Color3<Rgba>
  • to_color3 for Color3f<Rgb> -> Color3<Rgb>
  • to_hsl for Color3<Rgb> -> Color3<Hsl>
  • to_linear for Color3f<Rgb> -> Color3f<LinRgb>

and more.

Figure out a way to make this less ad-hoc and prone to forgetting some combinations. From/Into are not necessarily a good match especially for lossy conversions like Color3f->Color3.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions