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

Commits on Aug 30, 2020

  1. Create sorted_colors-json.txt

    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)
    imvickykumar999 authored Aug 30, 2020
    Configuration menu
    Copy the full SHA
    956270b View commit details
    Browse the repository at this point in the history