HTML sanitization removes allowed attributes and styles

The html sanitization leaves only SAMPLE text from SAMPLE text. The text is sanitized by both sanitize and sanitizeforCards. Why do the sanitizers remove style=”color: rgb(230, 0, 0);” from the span tag?

My sanitizer is below:

import sanitizeHtml from 'sanitize-html'

const sanitizerConfig = {
  allowedTags: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div', 'b', 'i', 'strong', 'em', 'span', 'ul', 'ol', 'li', 'a',
    'u', 's', 'br'],
  allowedAttributes: {
    a: ['href', 'target', 'style'],
    span: ['style'],
    h1: ['style'],
    h2: ['style'],
    h3: ['style'],
    h4: ['style'],
    h5: ['style'],
    h6: ['style'],
    p: ['style'],
    div: ['style'],
    b: ['style'],
    i: ['style'],
    strong: ['style'],
    em: ['style'],
    ul: ['style'],
    ol: ['style'],
    li: ['style'],
    u: ['style'],
    s: ['style']
  },
  allowedStyles: {
    '*': {
      'text-align': [/^left$/, /^right$/, /^center$/]
    },
    span: {
      'text-decoration': [/^underline$/],
      color: true
    }
  }
}
const sanitizerConfigForCards = {
  allowedTags: ['p', 'div', 'b', 'i', 'strong', 'em', 'span', 'ul', 'ol', 'li'],
  allowedAttributes: {
    span: ['style']
  },
  allowedStyles: {
    span: {
      color: true
    }
  }
}

export const sanitize = (content) => sanitizeHtml(content, sanitizerConfig)
/** Sanitizes user-generated html content for displaying it inside of card components. */
export const sanitizeforCard = (content) => sanitizeHtml(content, sanitizerConfigForCards)