Print color

Report a typo

Write the code for the function printColor(myImage: BufferedImage). It reads 2 integers x and y (divided by space) and then gets the color at the position (x, y) of myImage. Finally, it prints the color values in the following order: Red, Green, Blue, Alpha, with a single space between the values.

Sample Input 1:

3 4

Sample Output 1:

3 8 7 248
Write a program in Kotlin
fun printColor(myImage: BufferedImage) {
// Write your code here

}
___

Create a free account to access the full topic