Skip to content

Ofcolor vector constructor#7696

Merged
danoli3 merged 12 commits intoopenframeworks:masterfrom
artificiel:ofcolor-vector
Apr 6, 2026
Merged

Ofcolor vector constructor#7696
danoli3 merged 12 commits intoopenframeworks:masterfrom
artificiel:ofcolor-vector

Conversation

@artificiel
Copy link
Copy Markdown
Contributor

is this too crude? inits an empty color then calls the appropriate setter based on number of elements.

use case: parsing a config files with colours that get passed as vectors, so:

ofColor(my_color_vector);

instead of

ofColor(my_color_vector[0], my_color_vector[1], my_color_vector[2], my_color_vector[3]);

@artificiel
Copy link
Copy Markdown
Contributor Author

well, I stumbled in a case where typename and class are not synonymous — but of course appleClang (current dev env) did not mind so I had to learn via GitHub CI... https://stackoverflow.com/questions/2023977/what-is-the-difference-between-typename-and-class-template-parameters

@artificiel artificiel mentioned this pull request May 16, 2024
54 tasks
Copy link
Copy Markdown
Member

@danoli3 danoli3 left a comment

Choose a reason for hiding this comment

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

Absolutely

@danoli3 danoli3 added this to the 0.12.1 milestone Aug 27, 2024
@danoli3
Copy link
Copy Markdown
Member

danoli3 commented Apr 6, 2026

Merging once Bots confirm.

This template update for ofColor may help some issues in ofxImGUI updates relating to template overload with imgconfig 1.92.7

@danoli3 danoli3 merged commit 4a26143 into openframeworks:master Apr 6, 2026
17 checks passed
@danoli3
Copy link
Copy Markdown
Member

danoli3 commented Apr 6, 2026

thanks @artificiel

Sign up for free to 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.

3 participants