linebender / linebender/color

Relative luminance for `AlphaColor` and `PremulColor`

Open
#49 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
110
Forks
14
Avg merge
16h 45m
Merged PRs (30d)
1

Description

I noticed that we don't have `relative_luminance` for `AlphaColor` and I assume that's because this formulation isn't as useful when there's alpha involved. But for `DynamicColor`, we just discard the alpha. But we also don't have this function for `PremulColor` ...

Should we have it for `AlphaColor` and discarding the Alpha?

Should we have it for `PremulColor`?

I don't have good arguments in favor of having it, so I'm just asking so we can have a decision.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing relative_luminance behavior for DynamicColor and the definitions of AlphaColor and PremulColor. Determine whether discarding alpha is appropriate and whether PremulColor should expose the operation; done means a clear, maintainer-approved decision with any resulting API or test changes identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.