Skip to content

color defs - #285

Open
raphael-goetz wants to merge 2 commits into
mainfrom
#282-color-defs
Open

color defs#285
raphael-goetz wants to merge 2 commits into
mainfrom
#282-color-defs

Conversation

@raphael-goetz

Copy link
Copy Markdown
Member

Resolves: #282

@github-actions

github-actionsBot commented Aug 12, 2026

Copy link
Copy Markdown

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/taurus/-/pipelines/2754090351

Status: Passed
Duration: 1 minutes

Job summaries

docs:preview

Documentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/15856606970/artifacts/out/index.html

@nicosammitonicosammito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing functions asHsl and fromHsl

name(en_US = "Color"),
display_message(en_US = "Color"),
alias(en_US = "color;colour;grb;hsv;hsl;hex"),
type_string = "{ hue: number; saturation: number; lightness: number; alpha: number }",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpha should be optional

}

/// Converts RGB (0..=255) + alpha (0..=1) into HSLA (hue 0..360, saturation/lightness 0..100, alpha 0..1).
fn rgb_to_hsl(red: f64, green: f64, blue: f64) -> (f64, f64, f64) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing optional alpha channel

}

/// Converts HSLA (hue 0..360, saturation/lightness 0..100) into RGB (0..=255).
fn hsl_to_rgb(hue: f64, saturation: f64, lightness: f64) -> (f64, f64, f64) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing optional alpha channel

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Color data types

2 participants

@raphael-goetz@nicosammito