Created
May 18, 2022 08:52
-
-
Save nawada/c2f0b6e9fc9ef13c824afcae3289a058 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://tumoiyorozu.github.io/white200/ | |
// 「スタート」「本番開始」ボタンを押したあと、 F12 で開発者ツール開いて以下を貼り付けてEnterでおk | |
const questionText = document.querySelector('#problem_text').innerText; | |
const colorText = questionText.match(/#([a-z0-9]{6})/)[1]; | |
const rText = colorText.substr(0, 2); | |
const gText = colorText.substr(2, 2); | |
const bText = colorText.substr(4, 2); | |
const r = Number.parseInt(rText, 16); | |
const g = Number.parseInt(gText, 16); | |
const b = Number.parseInt(bText, 16); | |
submit(r, g, b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment