1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
erica [24]
3 years ago
6

How to write a program converting RGB to CMYK in python

Computers and Technology
1 answer:
Arisa [49]3 years ago
5 0

rgb_scale = 255

cmyk_scale = 100

def rgb_to_cmyk(r,g,b):

if (r == 0) and (g == 0) and (b == 0):

return 0, 0, 0, cmyk_scale

# rgb [0,255] -> cmy [0,1]

c = 1 - r / float(rgb_scale)

m = 1 - g / float(rgb_scale)

y = 1 - b / float(rgb_scale)

min_cmy = min(c, m, y)

c = (c - min_cmy)

m = (m - min_cmy)

y = (y - min_cmy)

k = min_cmy

return c*cmyk_scale, m*cmyk_scale, y*cmyk_scale, k*cmyk_scale

def cmyk_to_rgb(c,m,y,k):

r = rgb_scale*(1.0-(c+k)/float(cmyk_scale))

g = rgb_scale*(1.0-(m+k)/float(cmyk_scale))

b = rgb_scale*(1.0-(y+k)/float(cmyk_scale))

return r,g,b

You might be interested in
Question 5 of 10
Ostrovityanka [42]
Hello!

Answer:
B. Analyze data from the car’s external cameras.

I hope that this helps you!
3 0
2 years ago
What steps can you take to secure your private information?.
pogonyaev

Answer:

Below:

Explanation:

1. Practice mail security. Use a public mailbox rather than your home mailbox to send bill payments and other mail containing sensitive information. Pick your mail up promptly and ask the post office to hold it while you’re away.

2. Guard your Social Security number. Don’t carry your Social Security card, military ID, Medicare, or other cards that have your Social Security number on them unless you are going somewhere where you will need them. Only provide your Social Security number when there is a legitimate need to do so.

3. Lock and shred. Keep your billing and banking statements and other personal records locked up and shred them when no longer needed.

4. Stop prescreened credit and insurance mailings. Call toll-free 1-888-567-8688 to get off mailing lists for credit and insurance offers. Your Social Security number will be required. This keeps thieves from intercepting and accepting the offers in your name and doesn’t affect your eligibility for credit or insurance.

5. Keep private information to yourself. Never respond to phone calls or emails asking to confirm your Social Security number or account numbers. Don’t leave PIN numbers, passwords or other personal information around for others to see.

6. Be safe online. Use anti-virus and anti-spyware software and a firewall on your computer and keep them updated. When you provide financial or other sensitive information online, the address should change from “http” to “https” or “shttp.” A symbol such as a lock that closes may also indicate that the transmission is secure.

7. Look at your bills and bank statements promptly. If you find any charges or debits that you never made, contact the bank or company immediately.

Hope it helps.......

It's Muska...  

6 0
3 years ago
Why are coders using encoder software? What are their advantages and disadvantages? And when might a coder need to use the codin
IrinaVladis [17]
<span>Coders using encoder software:
To enhance their productivity</span><span>
Speed and Efficiency
</span><span>Accuracy and consistency
</span>
Encoding is done to reduce the number of bit to be transmitted and save bandwidth .can be fairly complex and contain some delicate parts. This makes them less tolerant of mechanical abuse and restricts their allowable temperature.

<span>including increased productivity, accuracy, and efficiency in coding and the consistent application of coding rules. However, there is a cost to the software, but savings can be seen in other areas.</span>

7 0
3 years ago
Javier develops sophisticated fashion websites. He has been asked by the owner of a leading fashion brand to create web content
saul85 [17]

Answer:

hyperlinks

Explanation:

Javier should use hyperlinks to show the users the possible choices for their clothing.  This is really a terrible question and not likely in any real world scenario.  Fashion is always forward thinking and on the cutting edge.  When was the last time you went to a fashion website and were left with only choices to click on a hyperlink?  As Tim Gun would say "Make it work."  If I were able I would include a hyperlink using the previous sentence as the clickable link with a URL reference to

https : //en.wikipedia.org/wiki/Tim_Gunn (spaces after https to make this link not get censored)

to illustrate the way to show that hyperlinks have no real application on modern fashion website.  But they would have great utility here inside the answers section.  But they also are cause for a securtity concern and may be killed by the moderators

7 0
3 years ago
Mario is giving an informative presentation about methods for analyzing big datasets. He starts with the very basics, like what
Natasha2012 [34]

Answer:

Audience knowledge level

Explanation:

The Key issue that Mario failed to consider when preparing for her presentation is known as Audience knowledge level.  

Because Audience knowledge level comprises educating your audience with extensive information about the topic been presented. she actually tried in doing this but she was educating/presenting to the wrong audience ( People who are more knowledgeable than her on the topic ). she should have considered presenting a topic slightly different in order to motivate the audience.

3 0
3 years ago
Other questions:
  • Which of the following is a sigh that your computer may have been infected with malicious code
    12·1 answer
  • Which measure should you take for the periodic maintenance of your computer? You need to invest in a for_______________ the peri
    15·2 answers
  • In C, developers may access arrays via bracketed syntax like Java or by using * dereferencing notation. The following assignment
    5·1 answer
  • Your mom is trying to save room on her hard drive and wants to uninstall some of her applications. She asks you how to do this.
    9·2 answers
  • ​For complex models, analysts can choose computer-based modeling tools that use _____, which includes standard shapes and symbol
    10·1 answer
  • Discuss trends in cellular data transmission speeds
    15·2 answers
  • Select the correct answer
    5·2 answers
  • Drag the tiles to the correct boxes to complete the pairs.
    13·1 answer
  • Julie is purchasing new shoes on a website for her favorite store. Which of the following would indicate that a website is a sec
    6·1 answer
  • How to write the algorithm to calculate the square of five numbers
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!