PROBLEM 7 (12 pts) - Sorting colors by percieved luminance Write a function which receives as input a list of tuples, wh

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

PROBLEM 7 (12 pts) - Sorting colors by percieved luminance Write a function which receives as input a list of tuples, wh

Post by answerhappygod »

Problem 7 12 Pts Sorting Colors By Percieved Luminance Write A Function Which Receives As Input A List Of Tuples Wh 1
Problem 7 12 Pts Sorting Colors By Percieved Luminance Write A Function Which Receives As Input A List Of Tuples Wh 1 (46.12 KiB) Viewed 41 times
PROBLEM 7 (12 pts) - Sorting colors by percieved luminance Write a function which receives as input a list of tuples, where each tuple represents a color in the RGB color model. def sortColorsByLuminance(listofRgbColors): In this model a color is represented by three values (the value of Red, Green and Blue), each varying from 0 to 255. The perceived luminance of a color is calculated as: Luminance = 0.3 R + 0.59 G + 0.11 B (Note: this is due to the fact that humans perceive some colors brighter, for example green is perceived brighter than blue). The function should return the list of colors sorted by luminance (brightest to darkest).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply