Skip to content

Conversation

artragis
Copy link

@artragis artragis commented Jan 4, 2021

This API uses XSSFColor built with alpha channel to set up the right value.
We must take care of the fact Excel uses 1000th of percent and positive numbers

This API uses XSSFColor built with alpha channel to set up the right value.
We must take care of the fact Excel uses 1000th of percent and positive numbers
return ok;
}

public void setTextFillColor(XSSFColor color) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a getTextFillColor?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must I return null if no fill colour is found?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to return null if no value is set

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will try to do so. But translating CTColors into XSSFColor may be hard, Is there any helper to do that in the project?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XSSFColor has public static XSSFColor from(CTColor color, IndexedColorMap map) - you can use new DefaultIndexedColorMap()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will try to build org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor from CTSolidColorFillProperties.

I'm wondering if we cannot create a sub interface for all those colors instead of CTColor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants