Set string color to Beige

Report a typo

The function setStringToBeige() is called with a string parameter and returns the same string wrapped in two ANSI sequences. The first one – an RGB-colors ANSI sequence – sets the text color to Beige, and the second one resets the colors to their default values. Example: "<set Beige sequence><original string><reset sequence>". The RGB values for the Beige color are 245, 245, 220.

Your task is to write the code for the setStringToBeige() function.

Write a program in Kotlin
fun setStringToBeige(str: String): String {
// Write your code here

//
}
___

Create a free account to access the full topic