You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

colorstring.c 425 B

1234567891011121314151617181920
  1. #include <stdio.h>
  2. #include <pipi.h>
  3. int main(int argc, char *argv[])
  4. {
  5. if(argc!=2)
  6. {
  7. fprintf(stderr, "Need one argument (only)\n");
  8. return -1;
  9. }
  10. pipi_pixel_t *color = pipi_get_color_from_string(argv[1]);
  11. printf("Color : %f %f %f %f\n",
  12. color->pixel_float.r,
  13. color->pixel_float.g,
  14. color->pixel_float.b,
  15. color->pixel_float.a);
  16. return 0;
  17. }