Skip to content

Sharp0802/CFUL-Compact

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFUL-Compact

Colorful console output in C

Language

What is CFUL-Compact?

CFUL is functions for colorful console output. It is support RGB system.

But, CFUL is include many unnecessary functions and macros.

CFUL-Compact is a version that removes unnecessary functions of CFUL.

Support

  • Linux
  • Windows 10
  • MacOS

If your OS is not support true color, do not use this version

How to use?

You want this functions, then include only cful_compact.h on your project.

#include "cful_compact.h"

Set Color

SET_COLOR(type, r, g, b);

Type is FOREGROUND or BACKGROUND define.

#define FOREGROUND  "38"
#define BACKGROUND  "48"

Example

#include <stdio.h>
#include "cful-compact.h"

int main ( void )
{
    SET_COLOR(FOREGROUND, 255, 255, 255);

    SET_COLOR(BACKGROUND, 255, 0, 0);
    printf("Change back color red\n");
    
    SET_COLOR(BACKGROUND, 0, 255, 0);
    printf("Green");
    SET_COLOR(BACKGROUND, 0, 0, 255);
    printf("Blue\n");
    
    printf(RESET);
    
    return 0;
}



Thanks.

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%