the usage of a comparative form "at a position...than at a position "

I am trying to describe the color of the portion A in the picture shown above. My examples are as follows:

1. In the bar, the color of the portion A is darker at a position closer to the center than at a position closer to the right end.
2. In the bar, the color of the portion A is darker as the portion A is closer to the center of the bar than to the right end of the bar.

I am unsure whether my examples are correct because when I googled the expression "at a position...than at a position", I found only a few results. Could you advise me on my examples?

• "In the bar, the color of the potion A is darker towards the center and brighter towards the right end" is a good replacement. Jun 22, 2017 at 13:38
• I think it would be necessary to know if portion A were fixed in the bar, or moved within it. Both examples seem to suggest portion A is not fixed. Jun 27, 2017 at 9:24
• The portion A is fixed. Jun 27, 2017 at 9:36

Based on the supplied information, example 1:

In the bar, the color of the portion A is darker at a position closer to the center than at a position closer to the right end.

is closer to being correct. However, because position A is fixed in the bar, the prepositional phrase "at a position" is irrelevant, and possibly confusing. So

In the bar, the color of the portion A is darker closer to the center than closer to the right end.

supplies the information without ambiguity. SovereignSun's suggestion in comments is good.

Example 2:

In the bar, the color of the portion A is darker as the portion A is closer to the center of the bar than to the right end of the bar.

suggests a cause and effect cause and effect relationship with the position of portion A relative to the bar center (this possibly can be read to suggest that moving portion A toward the bar center will cause the colors to become darker).
I would not use example 2 as a model.
I hope this helps. If it does not, please post any concerns in comments.