Skip to content

Commit cda79b8

Browse files
Merge pull request #2 from SirGoodenough/License-&-Attribution-notice
License & Attribution notice
2 parents 63fd355 + 1a8c6f7 commit cda79b8

File tree

1 file changed

+137
-1
lines changed

1 file changed

+137
-1
lines changed

color_multi_tool.jinja

Lines changed: 137 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
SAMPLE USAGE:
1414
{% from 'color_multi_tool.jinja' import random_name %}
1515
{{- random_name() -}}
16+
17+
#### 🗿License Notice:
18+
* I & my license require attribution as a link back to the original should
19+
you use this code in your own creation.
20+
* Here is a link to my license & the original github post
21+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
22+
expected to be followed & referenced
23+
as attribution should you use this code elsewhere.
1624
#}
1725
{%- set _color_dict = _nameMap._rgb | random %}
1826
{{- _color_dict.color -}}
@@ -33,6 +41,14 @@
3341
3442
REMEMBER:
3543
Everything returned from a macro template is a string.
44+
45+
#### 🗿License Notice:
46+
* I & my license require attribution as a link back to the original should
47+
you use this code in your own creation.
48+
* Here is a link to my license & the original github post
49+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
50+
expected to be followed & referenced
51+
as attribution should you use this code elsewhere.
3652
#}
3753

3854
{%- set (X,Y) = [range(1001),range(1001)] | map('random') | list %}
@@ -54,6 +70,14 @@
5470
5571
REMEMBER:
5672
Everything returned from a macro template is a string.
73+
74+
#### 🗿License Notice:
75+
* I & my license require attribution as a link back to the original should
76+
you use this code in your own creation.
77+
* Here is a link to my license & the original github post
78+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
79+
expected to be followed & referenced
80+
as attribution should you use this code elsewhere.
5781
#}
5882
{%- set (H,S) = [range(36001),range(10001)] | map('random') | list %}
5983
{{- H/100 -}},{{- S/100 -}}
@@ -74,6 +98,14 @@
7498
7599
REMEMBER:
76100
Everything returned from a macro template is a string.
101+
102+
#### 🗿License Notice:
103+
* I & my license require attribution as a link back to the original should
104+
you use this code in your own creation.
105+
* Here is a link to my license & the original github post
106+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
107+
expected to be followed & referenced
108+
as attribution should you use this code elsewhere.
77109
#}
78110
{% set (R,G,B) = [range(256),range(256),range(256)] | map('random') | list %}
79111
{{- R -}},{{- G -}},{{- B -}}
@@ -99,6 +131,14 @@
99131
100132
REMEMBER:
101133
Everything returned from a macro template is a string.
134+
135+
#### 🗿License Notice:
136+
* I & my license require attribution as a link back to the original should
137+
you use this code in your own creation.
138+
* Here is a link to my license & the original github post
139+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
140+
expected to be followed & referenced
141+
as attribution should you use this code elsewhere.
102142
#}
103143
{#- First a test to make sure input is valid #}
104144
{%- if chkNAME(color_name) | bool %}
@@ -133,6 +173,14 @@
133173
134174
REMEMBER:
135175
Everything returned from a macro template is a string.
176+
177+
#### 🗿License Notice:
178+
* I & my license require attribution as a link back to the original should
179+
you use this code in your own creation.
180+
* Here is a link to my license & the original github post
181+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
182+
expected to be followed & referenced
183+
as attribution should you use this code elsewhere.
136184
#}
137185
{#- First a test to make sure input is valid #}
138186
{%- if chkRGB(rgbl) | default(false) | bool %}
@@ -183,6 +231,14 @@
183231
184232
REMEMBER:
185233
Everything returned from a macro template is a string.
234+
235+
#### 🗿License Notice:
236+
* I & my license require attribution as a link back to the original should
237+
you use this code in your own creation.
238+
* Here is a link to my license & the original github post
239+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
240+
expected to be followed & referenced
241+
as attribution should you use this code elsewhere.
186242
#}
187243
{#- First a test to make sure input is valid #}
188244
{%- if chkRGB(rgbl) | bool %}
@@ -252,6 +308,14 @@
252308
253309
REMEMBER:
254310
Everything returned from a macro template is a string.
311+
312+
#### 🗿License Notice:
313+
* I & my license require attribution as a link back to the original should
314+
you use this code in your own creation.
315+
* Here is a link to my license & the original github post
316+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
317+
expected to be followed & referenced
318+
as attribution should you use this code elsewhere.
255319
#}
256320
{#- First a test to make sure input is valid #}
257321
{%- if chkXY(xyl) | bool %}
@@ -323,6 +387,14 @@
323387
324388
REMEMBER:
325389
Everything returned from a macro template is a string.
390+
391+
#### 🗿License Notice:
392+
* I & my license require attribution as a link back to the original should
393+
you use this code in your own creation.
394+
* Here is a link to my license & the original github post
395+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
396+
expected to be followed & referenced
397+
as attribution should you use this code elsewhere.
326398
#}
327399
{#- First a test to make sure input is valid #}
328400
{%- if chkHS(hsl) | bool %}
@@ -391,14 +463,22 @@
391463
Code lifted directly from the here November, 2023 at
392464
https://www.cs.rit.edu/~ncs/color/t_convert.html#RGB%20to%20HSV%20&%20HSV%20to%20RGB.
393465
Brightness is assumed to be 100%
394-
466+
395467
SAMPLE USAGE:
396468
{% from 'color_multi_tool.jinja' import rgb2hs %}
397469
{% set _rgb2hs = rgb2hs(rgbl).split(",") | list %}
398470
{{[ _rgb2hs[0]|float(0)|round(3),_rgb2hs[1]|float(0)|round(3)] }}
399471
400472
REMEMBER:
401473
Everything returned from a macro template is a string.
474+
475+
#### 🗿License Notice:
476+
* I & my license require attribution as a link back to the original should
477+
you use this code in your own creation.
478+
* Here is a link to my license & the original github post
479+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
480+
expected to be followed & referenced
481+
as attribution should you use this code elsewhere.
402482
#}
403483
{#- First a test to make sure input is valid #}
404484
{%- if chkRGB(rgbl) | bool %}
@@ -464,6 +544,14 @@
464544
465545
REMEMBER:
466546
Everything returned from a macro template is a string.
547+
548+
#### 🗿License Notice:
549+
* I & my license require attribution as a link back to the original should
550+
you use this code in your own creation.
551+
* Here is a link to my license & the original github post
552+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
553+
expected to be followed & referenced
554+
as attribution should you use this code elsewhere.
467555
#}
468556
{#- First a test to make sure input is valid #}
469557
{%- if chkHS(hsl) | bool %}
@@ -498,6 +586,14 @@
498586
499587
REMEMBER:
500588
Everything returned from a macro template is a string.
589+
590+
#### 🗿License Notice:
591+
* I & my license require attribution as a link back to the original should
592+
you use this code in your own creation.
593+
* Here is a link to my license & the original github post
594+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
595+
expected to be followed & referenced
596+
as attribution should you use this code elsewhere.
501597
#}
502598
{#- First a test to make sure input is valid #}
503599
{%- if chkXY(xyl) | bool %}
@@ -535,6 +631,14 @@ Development credit to @Didgeridrew and @jeffcrum on the
535631
REMEMBER:
536632
This always returns text, so cast to bool on the other end to be
537633
certain of the result.
634+
635+
#### 🗿License Notice:
636+
* I & my license require attribution as a link back to the original should
637+
you use this code in your own creation.
638+
* Here is a link to my license & the original github post
639+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
640+
expected to be followed & referenced
641+
as attribution should you use this code elsewhere.
538642
#}
539643
{%- if _rgbl is list and _rgbl | count == 3 %}
540644
{%- for clr in _rgbl if is_number(clr) and int(clr,0) == clr and 0 <= clr <= 255 %}
@@ -564,6 +668,14 @@ Development credit to @123 on the
564668
REMEMBER:
565669
This always returns text, so cast to bool on the other end to be
566670
certain of the result.
671+
672+
#### 🗿License Notice:
673+
* I & my license require attribution as a link back to the original should
674+
you use this code in your own creation.
675+
* Here is a link to my license & the original github post
676+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
677+
expected to be followed & referenced
678+
as attribution should you use this code elsewhere.
567679
#}
568680
{{- _xyl is list and
569681
_xyl | select('number') | list | count == 2 and
@@ -591,6 +703,14 @@ Development credit to @123 on the
591703
REMEMBER:
592704
This always returns text, so cast to bool on the other end to be
593705
certain of the result.
706+
707+
#### 🗿License Notice:
708+
* I & my license require attribution as a link back to the original should
709+
you use this code in your own creation.
710+
* Here is a link to my license & the original github post
711+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
712+
expected to be followed & referenced
713+
as attribution should you use this code elsewhere.
594714
#}
595715
{{- _hsl is list and
596716
_hsl | select('number') | list | count == 2 and
@@ -616,6 +736,14 @@ If any is not true, return false.
616736
REMEMBER:
617737
This always returns text, so cast to bool on the other end to be
618738
certain of the result.
739+
740+
#### 🗿License Notice:
741+
* I & my license require attribution as a link back to the original should
742+
you use this code in your own creation.
743+
* Here is a link to my license & the original github post
744+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
745+
expected to be followed & referenced
746+
as attribution should you use this code elsewhere.
619747
#}
620748
{%- if color_name is string_like and
621749
color_name == color_name | regex_replace('[^a-z]', '') %}
@@ -647,6 +775,14 @@ If any is not true, return false.
647775
SAMPLE USAGE:
648776
{% from 'color_multi_tool.jinja' import color_list %}
649777
{{- color_list().split('\n') | list -}}
778+
779+
#### 🗿License Notice:
780+
* I & my license require attribution as a link back to the original should
781+
you use this code in your own creation.
782+
* Here is a link to my license & the original github post
783+
https://github.com/SirGoodenough/Color-Multi-Tool?tab=License-1-ov-file
784+
expected to be followed & referenced
785+
as attribution should you use this code elsewhere.
650786
#}
651787
{%- for colors in _nameMap._rgb -%}
652788
{%- set c_list = {colors.color:[colors.r,colors.g,colors.b]} -%}

0 commit comments

Comments
 (0)