{"id":17993376,"url":"https://github.com/vendicated/pride","last_synced_at":"2025-04-04T05:12:49.064Z","repository":{"id":208091413,"uuid":"720807799","full_name":"Vendicated/pride","owner":"Vendicated","description":"🏳️‍🌈 LGBT pride via github languages list 🏳️‍🌈","archived":false,"fork":false,"pushed_at":"2023-11-19T17:17:02.000Z","size":16,"stargazers_count":63,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T16:38:12.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Promela","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vendicated.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"Vendicated"}},"created_at":"2023-11-19T17:00:47.000Z","updated_at":"2025-01-09T09:12:37.000Z","dependencies_parsed_at":"2023-11-19T17:42:00.690Z","dependency_job_id":null,"html_url":"https://github.com/Vendicated/pride","commit_stats":null,"previous_names":["vendicated/gay"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2Fpride","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2Fpride/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2Fpride/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2Fpride/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vendicated","download_url":"https://codeload.github.com/Vendicated/pride/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123087,"owners_count":20887261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T20:11:13.959Z","updated_at":"2025-04-04T05:12:49.045Z","avatar_url":"https://github.com/Vendicated.png","language":"Promela","funding_links":["https://github.com/sponsors/Vendicated"],"categories":[],"sub_categories":[],"readme":"# 🏳️‍🌈 LGBT pride\n\nLGBT pride via github languages list\n\n![image](https://github.com/Vendicated/gay/assets/45497981/4f5a0f42-56bf-4cea-8f04-498db315bfb5)\n\n\nInspired by https://github.com/spacekookie/gay\n\nUnfortunately, spacekookie's repo broke, because the OCaml language colour was changed.\nThus, i decided to make my own variant and make the colours as close to the original flag as possible.\n\n\n\u003cdetails\u003e\n\u003csummary\u003eTo find the closest coloured languages, i wrote this incredibly shitty script\u003c/summary\u003e\n  \nbased on https://gist.github.com/Ademking/560d541e87043bfff0eb8470d3ef4894\n\n```js\nconst linguistYaml = await fetch(\"https://raw.githubusercontent.com/github-linguist/linguist/master/lib/linguist/languages.yml\").then(r =\u003e r.text());\nconst baseColors = Array.from(\n    linguistYaml.matchAll(/(^[^\\n:]+):\\n  type: programming\\n  color: \"(#\\w{6})\"/gm),\n    ([, name, hex]) =\u003e ({ name, hex }));\n\nfunction hexToRgb(hex) {\n    var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n    hex = hex.replace(shorthandRegex, function (m, r, g, b) {\n        return r + r + g + g + b + b;\n    });\n\n    var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n    return result ? {\n        r: parseInt(result[1], 16),\n        g: parseInt(result[2], 16),\n        b: parseInt(result[3], 16)\n    } : null;\n}\n\n// Distance between 2 colors (in RGB)\n// https://stackoverflow.com/questions/23990802/find-nearest-color-from-a-colors-list\nfunction distance(a, b) {\n    return Math.sqrt(Math.pow(a.r - b.r, 2) + Math.pow(a.g - b.g, 2) + Math.pow(a.b - b.b, 2));\n}\n\n// return nearest color from array\nfunction nearestColor(colorHex) {\n    var lowest = Number.POSITIVE_INFINITY;\n    var tmp;\n    let index = 0;\n    baseColors.forEach((el, i) =\u003e {\n        tmp = distance(hexToRgb(colorHex), hexToRgb(el.hex));\n        if (tmp \u003c lowest) {\n            lowest = tmp;\n            index = i;\n        };\n\n    });\n    return baseColors[index];\n\n}\n\nconst LgbtColors = [\n    {\n        name: \"Red\",\n        hex: \"#E40303\",\n    },\n    {\n        name: \"Orange\",\n        hex: \"#FF8C00\"\n    },\n    {\n        name: \"Yellow\",\n        hex: \"#FFED00\"\n    },\n    {\n        name: \"Green\",\n        hex: \"#008026\"\n    },\n    {\n        name: \"Blue\",\n        hex: \"#24408E\",\n    },\n    {\n        name: \"Purple\",\n        hex: \"#732982\"\n    }\n];\n\nfor (const { name, hex } of LgbtColors) {\n    console.log(`${name} -\u003e ${nearestColor(hex).name}`);\n}\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendicated%2Fpride","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvendicated%2Fpride","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendicated%2Fpride/lists"}