openframeworks / openframeworks/openFrameworks
ofColor and clamping
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
ofColor_:operator+= currently calls clamp() when it's done doing the +=
i imagined one of the applications of ofFloatColor would be for averaging or summing ofColor, which normally requires non-saturation semantics for +=. i could also do a / or * every += operation to avoid overflow. this doesn't have to be a bug, but it should at least be documented clearly when we discuss ofColor.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ofColor_::operator+= and inspect how it calls clamp() after addition. Check the existing ofColor documentation and related tests, if present. Done means the intended non-saturation behavior or its documentation is clearly established, with coverage for averaging or summing colors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100