Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[p5.js 2.0] Color module rewrite #7406

Merged
merged 24 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c861436
Enable 2D HDR canvas
limzykenneth Dec 4, 2024
e68920e
First round converting color test to new syntax
limzykenneth Dec 5, 2024
51f897f
Move color related settings to be handled by color module
limzykenneth Dec 5, 2024
7233934
Rearrange function definitions
limzykenneth Dec 6, 2024
3ec6264
Move instance member to different file and fix tests
limzykenneth Dec 6, 2024
d13bed7
Color maxes now change according to instance's maxes
limzykenneth Dec 8, 2024
6e58780
Implement translation between p5.js range and color.js range
limzykenneth Dec 8, 2024
8cc09a0
Automatically uses P3 color mode for HDR canvas
limzykenneth Dec 8, 2024
364813d
Add a couple more color spaces for testing
limzykenneth Dec 8, 2024
2bde2b8
Add support for CIE Lab and OKLab color spaces and negative color range
limzykenneth Dec 11, 2024
b002339
Add HWB color space
limzykenneth Dec 11, 2024
19a0613
Implement srgb utility method and do in gamut conversion where possible
limzykenneth Dec 11, 2024
bd56f18
Refactor for precalculated values
limzykenneth Dec 11, 2024
190b1e1
Use own HSB implementation instead of HSV for compatibility reasons
limzykenneth Dec 11, 2024
ea9a65e
Changing color mode of created color will be through creating new col…
limzykenneth Dec 12, 2024
b0ecf3f
Move maxes to be tracked in p5 instance instead of in color object
limzykenneth Dec 14, 2024
173f070
Use life cycle hook to decorate p5.Color methods for access to maxes
limzykenneth Dec 15, 2024
e0cc024
Account for RGB HDR in a few more cases
limzykenneth Dec 15, 2024
d058101
Merge branch 'dev-2.0' into 2.0-color
limzykenneth Dec 15, 2024
890c5ce
Fix some compatibility issues
limzykenneth Dec 15, 2024
18b3ffa
Fix Color constructor usage
limzykenneth Dec 15, 2024
8c8c47f
Fix failing test cases
limzykenneth Dec 15, 2024
ec876d8
Try to fix vertex coloring
limzykenneth Dec 16, 2024
8070a04
Merge branch 'dev-2.0' into 2.0-color
limzykenneth Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,138 changes: 589 additions & 549 deletions src/color/creating_reading.js

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions src/color/p5.Color.culori.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
class Color {
_color;
maxes;
mode;
array;

static addColorMode(mode, definition){

}

constructor(vals){

}

toString(){

}

setRed(new_red){

}

setGreen(new_green){

}

setBlue(new_blue){

}

setAlpha(new_alpha){

}

_getRed(){

}

_getGreen(){

}

_getBlue(){

}

_getAlpha(){

}

_getHue(){

}

_getSaturation(){

}

_getBrightness(){

}

_getLightness(){

}
}
Loading
Loading