We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Color : RGBA in HTML does not Import into Aspose.Words DOM using .NET

When using DocumentBuilder.InsertHtml to add html content to a word document, any colors specified using “rgba” are ignored completely.

You can demonstrate this on https://products.aspose.app/words/conversion as follows:

  1. Extract the file “test.html” from the attached zip file
  2. Open the file in your browser and note that all 4 lines are colored
  3. Upload the file to https://products.aspose.app/words/conversion and download it as a DOCX file
  4. Note that only 2 of the lines are colored

test.zip (286 Bytes)


Please note that Aspose.Words mimics the behavior of MS Word. If you open the HTML in MS Word, you will get the same output. However, we have logged new feature request as WORDSNET-22433 to import the color formatting with Color : rgba() into Aspose.Words’ DOM. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

1 Like


Your issue (WORDSNET-22433) has been closed with ‘Won’t Fix’ resolution.

Aspose.Words’ document model does not support colors that are not fully opaque and sets alpha value of all colors to 1. As a result, we cannot fully support “rgba()” and “hsla()” CSS functions.