how to change background color in c programming

#include <stdio.h>
#include <windows.h>

int main() {
    system("color 1F"); // Change background color to blue (1) and text color to white (F)
    printf("Hello, colored background!");
    return 0;
}