Question: May I please know how to program this question in python? Thank you. You are tasked with writing a program that will create a linear

May I please know how to program this question in python? Thank you.

You are tasked with writing a program that will create a linear interpolation between two pixels. You are to read in two pixel values and generate a number of pixels specified between them.

May I please know how to program this question in python? Thank

For example:

you. You are tasked with writing a program that will create a

Input for the program Enter the first colour: 0x002222 Enter the second colour: 8xFFDD33 Enter the number of colours to generate inbetween: 3 Using the 2 pixels specified it will generate 3 new pixels between the first and last pixel. You will need to round the difference of each channel between the larger and smaller pixel. (Edit, I have updated it so you need to round the channels not the pixels themselves). You will find the channel (Red, Green, Blue) difference between the two pixels and divide by the number of total pixels create the new pixels Colours: 0x002222 0x405126 0x80802a 0xceaf2e 0xffdd33 Your program will need to swap the starting pixel (or smallest) out of the two that were inputted should be the first colour shown while the larger pixel should be the last pixel specified

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!