Java & JavaScript Color Quiz Test Your Java & JavaScript Skills: Beginner’s Quiz 1 / 5 Which format can be used to define colors in JavaScript? Hex code (#FF0000) RGB (rgb(255,0,0)) Color names (“red”) All of the above 2 / 5 In Java, which class is commonly used to represent colors in GUI applications? java.lang.Color javax.swing.Color java.awt.Color java.util.Color 3 / 5 Which JavaScript property is used to change the text color of an element? color fontColor textColor backgroundColor 4 / 5 Which Java method is used to set color in GUI applications (like Swing)? setColor() colorize() setTextColor() changeColor() 5 / 5 Which of the following is a valid way to set a color in JavaScript? setColor(“red”) element.style.textColor = “red” element.color = “red” element.style.color = “red” Your score isThe average score is 0% 0% Restart quiz Send feedback