Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1.2.32 from computer science: an interdisciplinary approach. Can anyone answer this using JAVA with RGB and CMYK being arrays? thank you Color conversion. Several

Question 1.2.32 from computer science: an interdisciplinary approach. Can anyone answer this using JAVA with RGB and CMYK being arrays? thank youimage text in transcribed

Color conversion. Several different formats are used to represent color. For example, the primary format for LCD displays, digital cameras, and web pages, known as the RGB format, specifies the level of red (R), green (G), and blue (B) on an integer scale from 0 to 255. The primary format for publishing books and magazines, known as the CMYK format, specifies the level of cyan (C), magenta (M), yellow (Y), and black (K) on a real scale from 0.0 to 1.0. Write a program RGBtoCMYK that converts RGB to CMYK. Take three integers-r, g, and b-from the command line and print the equivalent CMYK values. If the RGB values are all 0, then the CMY values are all 0 and the K value is 1; otherwise, use these formulas: w = max ( n255, g / 255, b / 255 ) c-(w- (r/255)/ w m = (w-(g / 255)) / w y- (w-(b/255) / w k=1-w

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

1. Identify the sources for this conflict.

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago