Ionic 4: custom colors problem

Last try!
I’ve created a BLANK ionic 4 project and I can confirm it really IS working. So it looks like something is wrong on your side.

  1. First update your Ionic and/or Cordova if necessary.
    npm i -g ionic cordova
  2. Delete your www folder and your cache
  3. Check if you have any concurring styling and retry.

If it still doesn’t work, then I’m sorry : )

home.page.html

<ion-header>
  <ion-toolbar color='animal'>
    <ion-title>
      Ionic Blank
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <div class="ion-padding">
    The world is your oyster.
    <p>If you get lost, the <a target="_blank" rel="noopener" href="https://ionicframework.com/docs/">docs</a> will be your guide.</p>
  </div>
</ion-content>

variables.scss

/** Ionic CSS Variables **/
:root {
  /** primary **/
  --ion-color-primary: #3880ff;
  --ion-color-primary-rgb: 56, 128, 255;
  --ion-color-primary-contrast: #ffffff;
  --ion-color-primary-contrast-rgb: 255, 255, 255;
  --ion-color-primary-shade: #3171e0;
  --ion-color-primary-tint: #4c8dff;

  /** secondary **/
  --ion-color-secondary: #0cd1e8;
  --ion-color-secondary-rgb: 12, 209, 232;
  --ion-color-secondary-contrast: #ffffff;
  --ion-color-secondary-contrast-rgb: 255, 255, 255;
  --ion-color-secondary-shade: #0bb8cc;
  --ion-color-secondary-tint: #24d6ea;

  /** tertiary **/
  --ion-color-tertiary: #7044ff;
  --ion-color-tertiary-rgb: 112, 68, 255;
  --ion-color-tertiary-contrast: #ffffff;
  --ion-color-tertiary-contrast-rgb: 255, 255, 255;
  --ion-color-tertiary-shade: #633ce0;
  --ion-color-tertiary-tint: #7e57ff;

  /** success **/
  --ion-color-success: #10dc60;
  --ion-color-success-rgb: 16, 220, 96;
  --ion-color-success-contrast: #ffffff;
  --ion-color-success-contrast-rgb: 255, 255, 255;
  --ion-color-success-shade: #0ec254;
  --ion-color-success-tint: #28e070;

  /** warning **/
  --ion-color-warning: #ffce00;
  --ion-color-warning-rgb: 255, 206, 0;
  --ion-color-warning-contrast: #ffffff;
  --ion-color-warning-contrast-rgb: 255, 255, 255;
  --ion-color-warning-shade: #e0b500;
  --ion-color-warning-tint: #ffd31a;

  /** danger **/
  --ion-color-danger: #f04141;
  --ion-color-danger-rgb: 245, 61, 61;
  --ion-color-danger-contrast: #ffffff;
  --ion-color-danger-contrast-rgb: 255, 255, 255;
  --ion-color-danger-shade: #d33939;
  --ion-color-danger-tint: #f25454;

  /** dark **/
  --ion-color-dark: #222428;
  --ion-color-dark-rgb: 34, 34, 34;
  --ion-color-dark-contrast: #ffffff;
  --ion-color-dark-contrast-rgb: 255, 255, 255;
  --ion-color-dark-shade: #1e2023;
  --ion-color-dark-tint: #383a3e;

  /** medium **/
  --ion-color-medium: #989aa2;
  --ion-color-medium-rgb: 152, 154, 162;
  --ion-color-medium-contrast: #ffffff;
  --ion-color-medium-contrast-rgb: 255, 255, 255;
  --ion-color-medium-shade: #86888f;
  --ion-color-medium-tint: #a2a4ab;

  /** light **/
  --ion-color-light: #f4f5f8;
  --ion-color-light-rgb: 244, 244, 244;
  --ion-color-light-contrast: #000000;
  --ion-color-light-contrast-rgb: 0, 0, 0;
  --ion-color-light-shade: #d7d8da;
  --ion-color-light-tint: #f5f6f9;

  /** accentlight **/
  --ion-color-animal: #ccf2ff;
  --ion-color-animal-rgb: 204,242,255;
  --ion-color-animal-contrast: #000000;
  --ion-color-animal-contrast-rgb: 0,0,0;
  --ion-color-animal-shade: #b4d5e0;
  --ion-color-animal-tint: #d1f3ff;
}

/** apply animal color **/
.ion-color-animal {
  --ion-color-base: var(--ion-color-animal) !important;
  --ion-color-base-rgb: var(--ion-color-animal-rgb) !important;
  --ion-color-contrast: var(--ion-color-animal-contrast) !important;
  --ion-color-contrast-rgb: var(--ion-color-animal-contrast-rgb) !important;
  --ion-color-shade: var(--ion-color-animal-shade) !important;
  --ion-color-tint: var(--ion-color-animal-tint) !important;
}

I’ll try that.
Thank you very much.

I tried everything you told me and I had the same problem.
I even created a new blank project to see if it would work but it didn’t.

So, I noticed something. The example I wrote here was with a light color. I must have confused the colors when writing the post. Light colors work because default text color is dark.
Could you or anyone please try with a dark color, like this:

/** animal **/
  --ion-color-animal: #1b7e6e;
  --ion-color-animal-rgb: 27,126,110;
  --ion-color-animal-contrast: #ffffff;
  --ion-color-animal-contrast-rgb: 255,255,255;
  --ion-color-animal-shade: #186f61;
  --ion-color-animal-tint: #328b7d;

  .ion-color-animal{
    --ion-color-base: var(--ion-color-animal) !important;
    --ion-color-base-rgb: var(--ion-color-animal-rgb) !important;
    --ion-color-base-contrast: var(--ion-color-animal-contrast) !important;
    --ion-color-base-contrast-rgb: var(--ion-color-animal-contrast-rgb) !important;
    --ion-color-base-shade: var(--ion-color-animal-shade) !important;
    --ion-color-base-tint: var(--ion-color-animal-tint) !important;
  }