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

Create sorted_colors-json.txt #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Create sorted_colors-json.txt #8

wants to merge 1 commit into from

Conversation

imvickykumar999
Copy link

this may be helpful dictionary to get color tuple code, I generated this using my very own algo using your colors.csv file by applying pandas inbuilt function.
I request you to please merge my pull request in your repo. !!!

algo is:

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/codebrainz/color-names/master/output/colors.csv')
dbox, rbox = {}, []

for i in range(df.shape[0]):
row = list(df.iloc[i])
crgb = c, rgb = row[0], (row[3], row[4], row[5])
rbox.append(rgb)
dbox.update({rgb : c})
rbox.sort()

cbox = []
for m in range(len(rbox)):
cbox.append(dbox.get(rbox[m]))

fdict = {}
for n in range(len(rbox)):
fdict.update({cbox[n] : rbox[n]})

print(fdict)

this may be helpful dictionary to get color tuple code, I generated this using my very own algo using your colors.csv file by applying pandas inbuilt function.
I request you to please merge my pull request in your repo. !!!

algo is:

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/codebrainz/color-names/master/output/colors.csv') 
dbox, rbox = {}, []

for i in range(df.shape[0]):
    row = list(df.iloc[i])
    crgb = c, rgb = row[0], (row[3], row[4], row[5])
    rbox.append(rgb)
    dbox.update({rgb : c})
rbox.sort()

cbox = []
for m in range(len(rbox)):
    cbox.append(dbox.get(rbox[m]))

fdict = {}
for n in range(len(rbox)):
    fdict.update({cbox[n] : rbox[n]})

print(fdict)
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