Skip to content

Commit d8cbd5c

Browse files
committed
fix colors
1 parent d1baf58 commit d8cbd5c

File tree

4 files changed

+29
-16
lines changed

4 files changed

+29
-16
lines changed

lib-compose/src/main/java/com/what3words/components/compose/maps/W3WMapDefaults.kt

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import androidx.compose.ui.unit.dp
99
import com.what3words.components.compose.maps.models.DarkModeStyle
1010
import com.what3words.components.compose.maps.models.W3WMarkerColor
1111
import com.what3words.core.types.geometry.W3WCoordinates
12+
import com.what3words.design.library.ui.theme.colors_blue_20
13+
import com.what3words.design.library.ui.theme.colors_blue_99
14+
import com.what3words.design.library.ui.theme.colors_grey_100
15+
import com.what3words.design.library.ui.theme.colors_grey_44
16+
import com.what3words.design.library.ui.theme.colors_red_50
17+
import com.what3words.design.library.ui.theme.colors_red_90
18+
import com.what3words.design.library.ui.theme.colors_red_99
1219

1320
enum class MapProvider {
1421
GOOGLE_MAP,
@@ -23,7 +30,7 @@ enum class MapProvider {
2330
*/
2431
object W3WMapDefaults {
2532
val LOCATION_DEFAULT = W3WCoordinates(51.521251, -0.203586)
26-
val MARKER_COLOR_DEFAULT = W3WMarkerColor(background = Color.Red, slash = Color.White)
33+
val MARKER_COLOR_DEFAULT = W3WMarkerColor(background = colors_red_50, slash = colors_red_99)
2734
const val MIN_SUPPORT_GRID_ZOOM_LEVEL_GOOGLE = 19f
2835
const val MIN_SUPPORT_GRID_ZOOM_LEVEL_MAP_BOX = 18.5f
2936

@@ -173,8 +180,12 @@ object W3WMapDefaults {
173180
}
174181

175182
fun defaultNormalMapColor(
176-
gridLineColor: Color = Color(0x29697F8D),
177-
markerColors: MarkerColors = defaultMarkerColor()
183+
gridLineColor: Color = colors_grey_44.copy(alpha = 0.16f),
184+
markerColors: MarkerColors = defaultMarkerColor(
185+
selectedZoomOutColor = W3WMarkerColor(background = colors_blue_20, slash = colors_blue_99),
186+
defaultMarkerColor = MARKER_COLOR_DEFAULT,
187+
selectedColor = colors_blue_20
188+
)
178189
): MapColor {
179190
return MapColor(
180191
gridLineColor = gridLineColor,
@@ -183,10 +194,11 @@ object W3WMapDefaults {
183194
}
184195

185196
fun defaultSatelliteMapColor(
186-
gridLineColor: Color = Color(0x29FFFFFF),
197+
gridLineColor: Color = colors_grey_100.copy(alpha = 0.24f),
187198
markerColors: MarkerColors = defaultMarkerColor(
188-
selectedZoomOutColor = W3WMarkerColor(background = Color(0xffdbeffa), slash = Color(0xff0a3049)),
189-
selectedColor = Color(0xfffcfcff)
199+
selectedZoomOutColor = W3WMarkerColor(background = colors_blue_99, slash = colors_blue_20),
200+
defaultMarkerColor = MARKER_COLOR_DEFAULT,
201+
selectedColor = colors_blue_99
190202
)
191203
): MapColor {
192204
return MapColor(
@@ -196,10 +208,11 @@ object W3WMapDefaults {
196208
}
197209

198210
fun defaultDarkMapColor(
199-
gridLineColor: Color = Color(0x29FFFFFF),
211+
gridLineColor: Color = colors_grey_100.copy(alpha = 0.16f),
200212
markerColors: MarkerColors = defaultMarkerColor(
201-
selectedZoomOutColor = W3WMarkerColor(background = Color(0xffdbeffa), slash = Color(0xff0a3049)),
202-
selectedColor = Color(0xfffcfcff)
213+
selectedZoomOutColor = W3WMarkerColor(background = colors_blue_99, slash = colors_blue_20),
214+
defaultMarkerColor = MARKER_COLOR_DEFAULT,
215+
selectedColor = colors_blue_99
203216
)
204217
): MapColor {
205218
return MapColor(
@@ -209,9 +222,9 @@ object W3WMapDefaults {
209222
}
210223

211224
fun defaultMarkerColor(
212-
selectedZoomOutColor: W3WMarkerColor = W3WMarkerColor(background = Color(0xFF0A3049), slash = Color(0xFFFCFCFF)),
213-
defaultMarkerColor: W3WMarkerColor = W3WMarkerColor(background = Color(0xffe11f26), slash = Color(0xfffffbff)),
214-
selectedColor: Color = Color(0xFF0A3049),
225+
selectedZoomOutColor: W3WMarkerColor,
226+
defaultMarkerColor: W3WMarkerColor,
227+
selectedColor: Color,
215228
): MarkerColors {
216229
return MarkerColors(
217230
selectedZoomOutColor = selectedZoomOutColor,

lib-compose/src/main/java/com/what3words/components/compose/maps/buttons/W3WMapButtonsDefault.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ object W3WMapButtonsDefault {
114114
@Composable
115115
fun defaultLocationButtonColor(
116116
locationBackgroundColor: Color = MaterialTheme.colorScheme.surface,
117-
locationIconColorInactive: Color = Color(0xFFAAABAE),
118-
locationIconColorActive: Color = Color(0xFF14B5FF),
117+
locationIconColorInactive: Color = MaterialTheme.colorScheme.outline,
118+
locationIconColorActive: Color = MaterialTheme.w3wColorScheme.brandCustomSkyBlue,
119119
warningLowBackgroundColor: Color = MaterialTheme.w3wColorScheme.warning,
120120
warningLowIconColor: Color = MaterialTheme.w3wColorScheme.onWarning,
121121
warningHighBackgroundColor: Color = MaterialTheme.colorScheme.error,

lib-compose/src/main/java/com/what3words/components/compose/maps/providers/googlemap/W3WGoogleMapDrawer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ fun W3WGoogleMapDrawGridLines(
194194
@Composable
195195
@GoogleMapComposable
196196
fun W3WGoogleMapDrawSelectedAddress(
197-
markerColors: W3WMapDefaults.MarkerColors = W3WMapDefaults.defaultMarkerColor(),
197+
markerColors: W3WMapDefaults.MarkerColors,
198198
zoomLevel: Float,
199199
zoomSwitchLevel: Float,
200200
selectedAddress: W3WAddress,

lib-compose/src/main/java/com/what3words/components/compose/maps/providers/mapbox/W3WMapBoxDrawers.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fun W3WMapBoxDrawGridLines(
193193
@Composable
194194
@MapboxMapComposable
195195
fun W3WMapBoxDrawSelectedAddress(
196-
markerColors: W3WMapDefaults.MarkerColors = W3WMapDefaults.defaultMarkerColor(),
196+
markerColors: W3WMapDefaults.MarkerColors,
197197
zoomLevel: Float,
198198
zoomSwitchLevel: Float,
199199
selectedAddress: W3WAddress,

0 commit comments

Comments
 (0)