+ 25

🏆 [M💙 Challenge] Hex Triplet Colour Shades ❤💚💙💜💛

Monday Blue 💙 Challenge Series #5 Let's get colourful this week! If you're familiar with the HTML challenges, there are a few quizzes that require you to identify the shade of colour based on the Hex Triplet (#RRGGBB). 💼 TASK Write a program to accept a Hex Triplet (#RRGGBB) and determine whether it represents the colour of the following categories:- "Black" #000000 "White" #FFFFFF "Shade of Grey" Neutral. Equal weightage of all components. "Shade of Red" Red dominant* "Shade of Green" Green dominant* "Shade of Blue" Blue dominant* * pure shades with equal weightage of other components. "Shade of Yellow" Red-Green dominant with relatively higher weightage than Blue. "Shade of Purple" Red-Blue dominant with relatively higher weightage than Green. "Shade of Cyan" Green-Blue dominant with relatively higher weightage than Red. 🔧 TEST CASE #252525 ➡ "Shade of Grey" #AA3333 ➡ "Shade of Red" #11BB11 ➡ "Shade of Green" #CCCCFF ➡ "Shade of Blue" #FACE00 ➡ "Shade of Yellow" #BB33AA ➡ "Shade of Purple" #22DD33 ➡ "Shade of Cyan" ❤ BONUS Creative and clear-cut approach is encouraged. 👍 SPECIAL MENTION https://code.sololearn.com/W0vQm8LhnxdQ/?ref=app Happy Coding!!! 😁💻

23rd Oct 2017, 2:57 AM
Zephyr Koo
Zephyr Koo - avatar
14 Réponses
16th Oct 2017, 4:06 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 14
OMG another fast and furious submission by Sir Krishna again!!! 🔥😱
16th Oct 2017, 4:19 AM
Zephyr Koo
Zephyr Koo - avatar
+ 12
My try...I disagree with some of the tests https://code.sololearn.com/cSfG3KJLbmdw/?ref=app
16th Oct 2017, 8:20 PM
David Akhihiero
David Akhihiero - avatar
+ 10
marking thread
16th Oct 2017, 9:38 AM
David Akhihiero
David Akhihiero - avatar
+ 9
Thanks everyone for your participation! I picked the fastest submission by Sir Krishna as there are only a few variation algorithms this time. Besides, I've added a special mention for the awesome visualization with EJS by Calviղ in the description as well. Anyway hope you all enjoy and let's move on to the next challenge! ❤ https://www.sololearn.com/Discuss/808616/?ref=app
23rd Oct 2017, 4:13 AM
Zephyr Koo
Zephyr Koo - avatar
+ 9
Here's my own C# implementation for anyone of you who's interested. 😉 https://code.sololearn.com/cdqQxYAzEfac/?ref=app
23rd Oct 2017, 4:15 AM
Zephyr Koo
Zephyr Koo - avatar
+ 7
@Calviղ Yup you're right! I'm having trouble to determine the correct name for it before this. For example Purple can be replaced with Magenta but the former sounds more natural to us. Thanks for your correction! 😄
16th Oct 2017, 7:41 AM
Zephyr Koo
Zephyr Koo - avatar
+ 6
@Yerucham Would you mind to elaborate it and the usage of magic number 21? 😉
17th Oct 2017, 2:11 AM
Zephyr Koo
Zephyr Koo - avatar
16th Oct 2017, 9:26 AM
Calviղ
Calviղ - avatar
+ 4
Another good challenge to try, by @Zephyr 👍🏼🤖 Btw should R-G dominance color be yellow color, not brown? I think Brown should belong to shade of Red?
16th Oct 2017, 7:02 AM
Calviղ
Calviղ - avatar
17th Oct 2017, 7:48 PM
Marlene
Marlene - avatar
- 1
HERES A NEW CHALLENGE CHECK IT AND TRY IF YOU WANT https://www.sololearn.com/discuss/793924/?ref=app
17th Oct 2017, 3:11 PM
sayan chandra
sayan chandra - avatar