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

change output of rgb2name to csv string #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mdieperink
Copy link

@mdieperink mdieperink commented Aug 25, 2024

Change the output of rgb2name to CSV string. So it's possible to convert the output to a list again after calling the function.
Also remove a linebreak from the output.

To test:

{% from 'color_multi_tool.jinja' import rgb2name %}
{%- set rgbl = (254,159,70) | list %}
{{ rgb2name(40, rgbl) }}
{{ rgb2name(40, rgbl).split(',') }}
{{ rgb2name(40, rgbl).split(',')[0] }}

output:

coral,goldenrod,sandybrown
['coral', 'goldenrod', 'sandybrown']
coral

@mdieperink mdieperink marked this pull request as ready for review August 25, 2024 20:02
@mdieperink mdieperink changed the title change output of rgb2name to csv list change output of rgb2name to csv string Aug 25, 2024
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.

1 participant