Oh, I don't feel awake enough to do this. Good High energy two or three I'm assuming this is your episode it is that's true. I don't remember making these slides That is possible that happen. Do you remember seeing them? I do remember seeing them We've done this before we certainly have second time round.  We know you that your memory is basically completely defunct at this point Absolutely like this will be a whole new experience all over again. Yep. Yeah making new friends every day some We did a video Now it feels like eons ago about color spaces. Yes, absolutely someone in the comments said it was the least wrong video on color Space and I'm like, you know what? That's the bar. I'm gonna strive for today as well Okay, we're not gonna manage because there's more there's more on color spaces that I want to talk about But if you haven't seen it if you you haven't seen it you should go back. I mean, I saw it I don't know. I was there. Did you see it or did you just to record it? This proof that I was in the room. It is I nodded along. You see did you pay attention? Who knows? Well, let's find out. Let's find out so color spaces we talked about this. Yes, if you don't know what this diagram means It's all in the previous video sRGB in that this the smaller one small triangle. Yes, P3 Rec 2020 that is correct and the well done have a cookie after we're done Thank you So the curvy bit is a a representation of the XYZ color space Which and inside this this colored bit those are all the colors a human can see Yes, and so these triangles form a subset of these colors that humans can see and The whole XYZ space was modeled through humans matching colors. So basically it tells you What happens when two colored lights mix? How do we as humans perceive that?  Those are green colors different green colors, but what green and the blue colors, you know similar, okay? You usually see these because you know Display P3 sRGB Rec. 20 are about displayed device capabilities And as you may know we have little pixels and red green and blue which emit light and then the slight mixes Inside our eye almost and we perceive the color so these Rectangular these triangles represent Which colors these devices can actually create by mixing the pixels and which colors they cannot? Yes, and people at home of probably watching this on I mean what one of the two inner triangles I'd say like it's less common to have a computer display Which is right 20 20, but even then our video will most likely just prescribe sRGB anyway Yes, so that's another layer of confusion that you know You just because you monitor can display a wreck 20 20 doesn't mean it will because if the media that is input into the device Says hey, I'm using sRGB Yes, yes, we're an sRGB series. Yes, it is RGB that exactly cool So these three color spaces as you said sRGB p3 and record Are actually available in CSS now. Yes So so far by default everything in CSS everything on the web pretty much was sRGB or turns out You know people who like colors Want access to to the other colors that are outside of the sRGB triangle? And so now We have this syntax to do that which is already kind of exciting that we have more colors So all these these color space are about giving you access to more colors and Safari actually has support for this like in Safari GP you can use these syntax and actually have this cool color picker thing Where you actually see whether the fancy color you're selecting is inside or outside the sRGB gamut Oh, that's so you know, you can see we actually don't get many new blues, but some new reds and a lot more Greens you get when way more greens look at that. Whoa much green Incredible and it kind of matches with the triangles we saw earlier So there's gonna be a lot of safari in this episode because it's it will be implemented chrome, but it's not even in canary yet So yeah credit to them for yeah, absolutely. It's great. Absolutely great. When you say not equivalent. What does that mean? So, you know, I Turned the first color sRGB 100 is as right as possible in sRGB Yes, we have just seen that what that, you know, this way p3 has more red Full red in display p3 is a different red than the red in sRGB Yes, I could have put the equivalent number in there But that would have been work that I didn't want to have to do XYZ is the one which is all possible colors and more and If you put a two in there, what happens? Does the red come out the monitor and There's almost too much red even contain within the screen even XYZ one zero zero is a color that doesn't exist Brilliant so that and that is actually we'll talk about that What does a browser do when you give it a color that it can't display or that potentially doesn't even exist full crash? Yeah, just like panic delete itself Otherwise it would break the universe and backwards compatible, right? Absolutely exactly So as I said, like we have these color spaces which are about giving you access to more colors But it's all just a subset of XYZ. There is also different perspectives onto XYZ Most notably LAB and LCH and we're going to talk about these now a little bit to explain how they're different So some of these are available in in Chrome, right? Well, so there's the There's the other one that's not RGB that we use which begins with an H HSL HSL So is that one of these perspectives? HSL. No, yeah. No HSL. No. Yes. No. No, that's great Brilliant explanation. Just move on. I went Australian and then added another. No, it's HSL is just a different perspective onto sRGB So it is in this has the same constraints Like you don't get access to more color by using HSL, but it is the same switch of perspective Like that you go from a a Cartesian coordinate system where each access the color to something it has an angle and Stuff which you do with with HSL, right? Exactly And this will actually happen here. So LAB and LCH are interesting because they are Perceptually uniform great keyword. So all of these are you don't need me.  Well done, sir My great keyword. Okay. Well, the thing is I see it thrown around so much and it actually It seems self-explanatory to people who already know what it means, but if you don't know what it means It's not self-explanatory. I don't know what it means. So I'll explain it to you. Thank you So all of these color spaces all of the XYZ stuff is Perceptual because it is based on humans perceiving colors and modeling a Space around how humans perceive it like you match colors and like oh, this is how I put this is orange I perceive it as orange and that's how XYZ was made, but it's not perceptually uniform Which means that you know you have one color and you add a bit of red to it And then you bet the same amount of red to it afterwards that doesn't mean you will see it as a Linear increment of redness in the color like the uniformity isn't there that like it could actually turn a completely different color technically But it's like XYZ and all the subspaces are about how light mixes and how humans perceive that mixed light Right. So the idea if you double the amount of red you as a human would look at it and go That looks like twice as much red even if it might not be no Yeah, no, that's actually not the case with XYZ so because yes, but with these ones Labelab with a uniform space that is the case especially around lightness we go Hey, I want to double the lightness you double the number and you get twice as bright a color Which is obviously very important for you know intuition around colors and when you pick your palates and stuff So let's start with LAB. This is The sRGB gamut inside LAB so every colorized pixel in this graph is A color that is inside RGB sRGB every pixel is outside of these is technically still a color But at least not inside sRGB, but just like XYZ There's also coordinates that aren't even real colors So that can be a bit confusing it can actually come with coordinates that don't represent any real color in the real world And it's just pointless in a way And so LAB has three coordinates LA and B hence the name L is for lightness is between Zero and a hundred and as I said sub uniform So if you go from hundred to fifty it's half as bright because it's half the brightness value, which is quite nice A is the red green axis B is the yellow blue axis It's not very intuitive, okay, I'm not gonna lie, but it is One of the first perception uniform color spaces and so here for example, you know We gain a 40% brightness on a we're going to minus 50 as a is the red green axis This is a nice green tone as rendered here By safari nice, but again, I feel like this is not necessarily very intuitive to use but as a rule of thumb both the ax and the b-axis go from I Think minus 130 to plus 130 to cover the human gamut Right, okay. So yeah, but then again covering the human gamut doesn't mean that your screen can actually Create that color with their pixels. So while you might have a real color It doesn't mean that it's actually a useful color on the web because I guess I'm laughing at it being 130 It's like why is it that but I magic number out of a hat Yeah, but we're used to using like 255 like for which, you know If you were shown if you show someone outside tech that it's like well, whether that number come from that's something They just made up. Okay. I'll get over I'm not sure where this comes from. I think it's just it's just a number Just just deal with it. All right. I'm dealing with it. So let's talk about LCH. So LCH is the HSL of XYZ I Want I want to see this in the museum. Is there a museum where there's this rock? That's like a nice sculpture doesn't was is this how it was invented? Did someone dig up that rock? I'm not like I was like spaces. I found the color stone And it's in a glass thing So I will say I don't find the socialization very helpful It's good Wikipedia, but I had to put something on the slide. Okay. Yeah, it's very pretty though So LCH is the same thing as HSL in that it has an angle and the lightness and the third axis here is Chromaticity It's more intuitive because you know, we kind of get used to like zero degrees is red and heart and 20 degrees It's green from HSL. Yes, what kind of things we kind of know. Is it the same here? It's exactly the same. Okay. The only thing it's really is that you the value you can use for C As you can see here depends on both other values like at zero You're obviously black at 100 your light but in the middle like you can sometimes go with chromaticity to 130 sometimes you can go only to 20 and Again, it is quite easy to fall outside the gamut which with LCH But it is a bit more intuitive. Okay to use So again, we can do 50% lightness 80 chromaticity zero degrees is a nice vibrant red a bit pinker here because chromaticity is Again can change actually what we usually perceive as you because of human eyes And when you're saying like you can fall outside the gamut, that's that would be the sRGB gamut, right? Yes, well, you can even fall outside the p3 gamut or Physical real-world color gamut amazing all of that is possible and it's actually a question like what happens if we give something That is outside the gamut and we'll talk about it a bit.  What would you expect?  No, why? Stupid, okay.  All right, but I mentioned in the last video that XYZ is the common denominator that one that we use for conversion from one color space to another instead of like, you know going straight from color space a color space B every conversion goes via XYZ It's like the source of truth color space to convert between all the color space that are out there And that's exactly what Safari is doing So we you know we define LCH with or we give a color defined with zero lightness 80 chromaticity in zero hue And then they just look up the formula for how do I convert from LCH to XYZ and That's just straight up math. This is what comes out the other side Okay, and then they look up math. How do I go from XYZ to sRGB and that's what comes out No, and there's a negative number which we know sRGB doesn't do and so how Safari currently handles that because how you should handle is unspect effectively the clamps It looks every component and says a you're outside go between zero and one and so that turns into a Darkish red, right? Whereas I guess a proper operation would be to shift by you know some amount which would end up with Zero it's actually quite hard to figure out how to describe what you should do But Leo Varou and Chris Lee have actually a really good website called CSS.land slash Color picker? LCH We'll put a link in the description We'll put a link in the description and you can see like once you go to lightness 100 every color is white if you go to lightness zero everything is black and they have Dark up an algorithm that handles this correctly and this is most likely what is going to be added to the CSS color spec So that we don't get a dark red when we just specify zero percent lightness good Thank you, Leo and Chris that will probably be changed and fixed soon What's also quite nice actually I found that in the CSS color for spec There is actually a reference implementation of all these color conversions in a very readable in simple JavaScript It is mostly supposed to be red, but it does work if you want to programmatic red as in hang on That's an overloaded term in this video It's mostly supposed to be viewed with your eyes with your eyes consumed as text. Yeah, okay It's very clearly written so you really see how do you do all these conversions? How do you define the colors luminance and if you want to use if you want to do color operations programmatically? Leah also maintains color.js Which is a library that has all of these things baked in with more performance and actually a nicer API So that's something worth looking at I'm really happy that they've done this because I I've been reading some Compositing specs and stuff and it's written in maths, which I don't understand. I don't understand the symbols. I find it Hard to deal with like these one letter values and stuff. Here's a big sigma. Right. Yeah, thanks I'll take it. No, but and then being able to you know, just find well That's what I've been doing with this compositing stuff is going to finding a implementation written in C Or as a shader or something. It's like oh now I can we know code we can read codes don't do the math Give me the code exactly. So this is great and also very well commented. So definitely Worth a look. Let's talk a bit about how to mix colors because we've been talking about mixing light But CSS actually doesn't do that as of now because let's say we have you know, we have red and blue What is the color in the middle? Right what one yeah, so that won't be seven of each right like it's exactly so that's basically you look at each Component like ours one component the our value the green value in the blue but each called components and you just You have them like you what's in the middle between zero and two or five And you do it per component and the same you do if you want to do like a 75 25 weighting So you could do you know 192 and 64 and the same the other way around and this is how Color mixing works. Yes, and it's actually also how gradients work in CSS, right? So and now you can tell that actually when you do it just per component the color space in which you define a color has a huge influence On what the output of mixing is because you know in RGB. It's RGB, but in HSL It is H SNL that are now being looked at independently and a different color will come out of the mixing process depending on in which color space you want to mix and That is something they are now adding to CSS where you can say explicitly I want to mix these two colors I want to mix them in a certain weight and the mixing should happen in this specific color space So basically this says mix these cousin s RGB, which is the default anyway Yes, which is the one we just saw before but you can basically Define, you know, I mean this like P3 doesn't make sense because it's effectively just a subset of XYZ But you could put LAB or LCH or something in there Define your colors in one space and mix them in another So so it's the when we're saying slig b the The values it takes and not just the gamuts. It's also the the perspectives on those gamuts. Yeah, yeah, exactly Okay, can you do both because you can use can you say well? I guess there's no real such thing as as lab in SLR GB as there is it well, you can you can basically define your colors The way you define the color is completely independent of where you're mixing itself just writing a red I could write color display P3 or or LAB or LCH I see so you define the color in one color space and then for the mixing CSS will convert However necessary to do the mixing appropriately. So in the last episode you identified how gradients were All right, I'm holding on so color mix is The result of the color mix function is a single color, which you know is good. That's handy For gradients, we don't have a syntax yet They are thinking about adding Something like this and in additional syntax where you now also say I want the gradients to be mixed in a specific color space Brilliant hasn't been specced yet. So for the purposes of this demos I've just been creating 255 dibs next to each other and assigning a new color to each so we can talk about How this color mixing really affects? Gradients and the color mixing process. So you might remember this from last time. I'm mixing red and green and as you can see The color space at shoes is quite important. We talked about last time, you know an sRGB you dip to this darkish yellow Blurpy color that's actually not really nice. So you mentioned last time that the doing things in linear color is the is that XYZ is basically XYZ, which is I see and you can see like it looks nicer But actually you go away from red really really quickly. Yes, LAB very even very nice And LCH almost the same I personally actually like HSL the most even though it's neither uniform brightness nor is it It it's just you know, you rotate the hue, but actually I think in turn looking at this I like it the best what I really like about this syntax is if you go to an article about linear gradients and CSS one of the examples that will come up with is a Rainbow yeah, right and the way they'll do it is by having like a load of points Yeah, but I think you're saying here is that you would be able to do this with two points Yeah, you go from 0 360 you go from 0 360 and it would go all the way around the color wheel and keep everything And that's actually really really nice, right? But that is really really nice So yeah, this is the the red-green comparison where I think you know, there's some differences But overall it looks fairly similar like not a huge difference if we look at red and blue it gets it More different again. I actually feel like HSL Looks the best although LCH also looks quite nice. I think it will depend on what you're About to say something obvious yet depends on the visual effect you're going for but I think it's interesting because I as far as I know most Design tools don't allow you to choose yet which color space you want your gradient in but it it will become a Design choice because I don't think there's a clear winner It it really depends on your use case which color space interpolation looks best for what you're going for Yes, I think we can all agree that the sRGB one is not very good No, but the rest is is kind of like well now hold on because we've just been mixing primary colors like pure red and pure blue pure red and blue Pooh red we've only been mixing mate if you have blue poo. That's an issue. You're a smurf So we've only been mixing primary colors, so pure red pure blue or pure red and pure green and Let's mix non primary colors as things will get wild. How about yellow and blue? Wait, hang on These are very different. These are very different. So I think we cancel a green mixing sRGB looks sad. Yeah xyz Technically uniform brightness across but not necessarily what I was going for I think if I imagine going from yellow to blue I wouldn't expect an almost white in the middle and all of these are wrong I don't like any of them, right? It's a LCH and HSL again. Not good. It's kind of weird purple in the middle. I wouldn't expect Okay, that's a different same. I like LCH and HSL. They're not what I expected, but they're pretty. Yes That is that colorful a trip So it's like there's I don't even know Which one I prefer here, but again, I think that's the same advice applies What are you doing? What are you trying to achieve in your design? Yeah So I think it's just really interesting that for me it kind of It kind of became clear that for gradients The color space in which you're interpreting is part of the design choice and something that needs to be shared with the developer That implements the gradients because you know what they differently otherwise. Yes Adam's favorite is doing blue to white or blue to black because if you look at sRGB It's really hard to unsee once you actually dips to a bit of purple Yes, it does along the gradient and you usually don't want that when you go from Black to blue and so his his method of fixing sRGB is like to add as you said like an additional stop That counteracts the the purple shift I mean LCH and HSL just go full purple on you So like again like you can see like it all looks different and people just need to start working with these gradients and differently It's really interesting to see. Yeah, so the reason that sRGB is Not great in any of these examples is because yes, it's it's like all of them linearly interpolating But the values in sRGB are not actually linear. No, they have this gamma correction on top Which stems from CRT monitors, but is coincidentally also kind of how our eyes adapt to brightness Yes, it's like it's it's a it's a happy coincidence But it it doesn't work for color mixing and stuff So most of the time when you operate on colors You kind of need to remove the gamma correction and that's called linear sRGB or XYZ which is actually in this sense then in this scenario Full for the same purpose. All right one last thing I want to talk about Did you notice that HSL has a different text color than all the others I? Do notice it. Yes. Do you know why? Because it would be hard to read otherwise. It would be hard to read. Okay, and you know who made a color black. I It's you didn't know no CSS shows the text color. What because that's a new thing now There's a new function called color contrast Which you put in a color as a first argument and then you say versus and then you give a list of colors and Color contrast will choose the color which has the highest contrast to the first color Not fully automatically which especially you know in the context of dark mode or color animations can't be huge It actually has an additional Syntax where you can specifically define the WCAG contrast ratio Oh, that's and it will pick the first color in the list that qualifies so you can actually Express preference you express them in the order of preference. Is there a way to tell it to just figure out from the background? No, okay, because I think that's quite hard because you know it there's compositing and Transparency so it actually quite hard to figure out be a bit of a round trip at least yeah, okay Yeah, and then also it ends up being you know per pixel because if you have a background image like yeah Yes, it would have to be an average across the element. Okay, okay fine. I would rather have this and nothing at all Oh, right. I'm not criticizing this. I was just I don't know looking from ideas Here's So it is implemented safari and you can see like when it comes to green it switches the text to black because humans perceive the brightness of green much more than the other colors and I think that's gonna be great like with a lot more Color construction going on this will be super handy and speaking of that They used to be a proposal for this color syntax where you you take a color and you have modifier function to make it color lighter Like this stuff that's in SAS. Yes, everything like that. Okay, this is not gonna happen great in the syntax There's another syntax, but this all right. There's still tutorials out there talking about this Everybody should know this is not the syntax. It is has been removed from the spec. This is not happening anymore Instead, they actually opted for something more powerful because it turns out, you know Lightness or contrast is not easily talked about if you don't know in which color space you're working Okay, so what they're doing instead and I think it's a really nice workaround they actually allow you to define a color and Say I want to work in HSL. So use the color from this variable in HSL and then you get HS and L as a variables that you can use in calc expressions To do your stuff and so whatever you choose or that's HSL, LAB, RGB You will get these variables to do proper math on with your calc expressions So example if you're in LAB, you can just say okay add 20% lightness to my color and the color that comes out will be 20% lighter Which I actually think is quite expressive and is that fine even if the input color is not expressed in HSL? Yes, it will convert. So if you use the HSL function, but the primary color variable here points to something that is defined in P3 or LAB The browser will do the conversion give you the variable values probably do the clamping if necessary And and you can do math and that will allow you to do stuff like define some primary colors and everything else could be Computationally generated both the color contrast for the text colors But also lighter shades darker shades like at some point I do envision that we will actually just you know Define some primary colors for dark wood and light, but the rest is programmatically derived very nice from those colors Which sounds like a great kind of future to me. Yeah Yeah, so if you want to know more this was like a speech on of what is in CSS color 4 and 5 most of this in Safari coming to Chrome Hopefully in Q1 2022. All right. All right. All right. Yes I'm looking forward to it. I am too. So what you want? What do you want to? I mean come on Say your words and then


I welcome you all for module 3 and lecture 3. Now, in this lecture we will solve some numerical problems on fit and tolerance, so that we can understand the concept more clearly. Now, let us start the problem number 1. The limits shown on a drawing for the mating hole and shaft are given here. For the hole basic size is 50 and the limits are shown here. And for the shaft, again the basic size is 50 and these are the limits upper limit and lower limit. Now, we have to find the allowance and then we have to state what is the type of fit. We have to calculate what is the greatest possible amount of clearance or interference over to blackboard. In the problem, the basic size of the shaft are given. The basic size is 50 millimeter and limits for upper limit and lower limit for hole and shaft are also mentioned. So, the maximum metal limit on the hole is 50 millimeter. So, this is the maximum metal limit for the hole and the minimum metal limit for the hole is 50.046 millimeter. So, this corresponds to the maximum metal limit and this is the minimum metal limit. So, and then we have a shaft where in the basic size is 50. Again the limits are given in the problem. The minimum size of the shaft is 49.971 millimeter and the maximum size of the shaft is 49.99 millimeter. And this is the tolerance zone for shaft and this is the tolerance zone for the hole. Now, since the minimum size of the hole is greater than the maximum size of the shaft, we have a clearance fit. And now, the allowance is the difference between the maximum metal limits of hole and shaft. So, the maximum metal limit for the hole is 50 millimeter and maximum metal limit for the shaft is 49.99 millimeter. So, the difference algebraic difference gives the 11. So, that is 0.01 millimeter. Now, the amount of clearance is the difference between the maximum size of hole that is 50.046 millimeter and minimum size of shaft that is 49.971 millimeter. So, this difference gives the greatest amount of clearance that is 0.075 millimeter. Now, we will move to problem number 2, wherein the limits of hole and shaft combinations are given. The basic size of hole and shaft is 80 millimeter and then the limits for hole and shaft are also mentioned in the problem. We have to find the type of fit and we have to find the allowance. And also, we have to determine the greatest possible amount of clearance or variance. Now, from the given problem, we can understand that the minimum metal limit for shaft is 80.071 millimeter and minimum metal limit for hole is 80.035 millimeter. So, that is shown in the picture here. This is the hole. The minimum size of the hole is 80 millimeter and maximum size of the hole is 80.035 millimeter and this corresponds to the minimum metal limit for hole. And we have a shaft here and the minimum size of the shaft corresponding to minimum metal limit is 80.071 millimeter and then the maximum size of the shaft is 80.093 millimeter corresponding to the maximum metal limit for hole. Now, since the minimum size of the shaft is greater than the maximum size of the hole, we have interference fit. Now, maximum metal limit for shaft is equal to 80.093 millimeter and then maximum metal limit for hole is 80 millimeter corresponding to this and then the difference gives the allowance difference between the maximum metal limit for shaft and maximum metal limit for hole gives us the allowance that is 80.093 millimeter minus 80 millimeter is equal to 0.093 millimeter and then greatest interference is equal to allowance is equal to 0.093 millimeter. Now, we will move to problem number 3, wherein the conditions given are maximum metal limit for the shaft is 100.026 millimeter, maximum metal limit for the hole is 100.0 millimeter, minimum metal limit for the hole is 100.036 millimeter and minimum metal limit for the shaft is 100.003 millimeter. We are required to find the type of fit and we have to find the allowance also. Now, over to blackboard. Now, these are the given conditions, maximum metal limit for shaft is 100.026 millimeter, maximum metal limit for hole is 100 millimeter. So, if hole and shaft are made to maximum metal limits, then we have interference fit. Now, from this picture we can understand that the maximum metal limit for shaft is 100.026 and minimum metal limit for shaft is 100.003 millimeter and this is the hole, the maximum metal limit for hole is 100 millimeter and minimum metal limit for hole is 100.036 millimeter. This is the tolerance zone for hole and this is the tolerance zone for shaft. Now, if both the hole and shaft are made to maximum metal limits, then we will be having interference fit. That is, if the hole is made to maximum metal limit, it will be 100 millimeter and if the shaft is made to maximum metal limit, it will be 100.026 millimeter. That means, shaft will be greater than the hole size. So, we will be having interference fit and now, minimum metal limit for hole is 100.036 millimeter, minimum metal limit for shaft is 100.003 millimeter. If both hole and shaft are made to minimum metal limits, then we will be having a clearance fit. That means, minimum metal limit for shaft is 100.003 millimeter and minimum metal limit for hole is 100.036 millimeter. That means, hole size will be bigger than the shaft size. So, we will be having a clearance fit and then allowance is the difference between the maximum metal limits of hole and shaft that is equal to 0.026 millimeter. Now, we will move to problem number 4. A 15 millimeter shaft is made to rotate in a bush. The tolerances for both shaft and bush are 0.050 millimeter. Determine the dimension of the shaft and bush to give an allowance of 0.075 millimeter with a hole basis system over to board. Now, in the case of hole basis system, lower deviation of hole will be 0. So, the lower limit of hole is equal to 50 millimeter which is given in the problem. So, higher limit of hole is equal to lower limit of hole plus tolerance. That is, lower limit of hole is 50 millimeter. To get the higher limit, we have to add the tolerance, then we get 50.050 millimeter. Now, high limit of shaft that is this value, high limit of shaft is equal to low limit of hole minus allowance, lower limit of hole minus allowance. Lower limit of hole is 50 millimeter and allowance is given in the problem that is 0.075 millimeter. So, we get higher limit of shaft is equal to 49.925 millimeter. So, higher limit of shaft is 49.925 millimeter. Now, in order to get the lower limit of shaft, we have to subtract tolerance from the higher limit of shaft. That is, we have to subtract this tolerance of 0.05 millimeter from the high limit of shaft that is 49.925. Then, we get the lower limit of shaft is equal to 49.875 millimeter. The problem is the figure below shows the assembly of a shaft and its mating hole. This is the shaft which is having the basic size of 30 millimeter and the limits are given. The minimum size of the shaft is 29.89 millimeter and the maximum size of the shaft is 29.95 millimeter and this is the bush fitted in the housing and the size of the hole are given here. The basic size is 30 millimeter and the minimum size of the hole is 30 millimeter and maximum size of the hole is 30.06 millimeter. Now, we have to give the appropriate dimensions for the following that is hole tolerance we have to calculate, shaft tolerance we have to calculate and then we have to calculate minimum clearance, maximum clearance, maximum metal condition for hole and minimum metal condition for shaft. Now, we have the solution here. Hole tolerance is the difference between these two that is 30.06 millimeter minus 30 millimeter will give us the hole tolerance of 0.06 millimeter. Similarly, to find the shaft tolerance we have to find the difference between the maximum size of the shaft and minimum size of the shaft that is 29.95 minus 29.89 will give us the shaft tolerance of 0.06 millimeter and then we have to find the minimum clearance between the shaft and the hole. So, this is equal to minimum size of the hole that is equal to 30 millimeter and minus maximum size of the shaft that is equal to 29.95 millimeter the difference gives us 0.05 millimeter and then maximum clearance is equal to maximum size of the hole minus minimum size of the shaft. So, maximum size of the hole is 30.06 millimeter and minimum size of the shaft is 29.89 millimeter the difference is 0.170 millimeter is the maximum clearance we get and then maximum metal condition for hole is equal to lower limit of the hole that is 30 millimeter and then minimum metal condition for the shaft is equal to lower limit of the shaft that is equal to 29.89 millimeter. So, all these values are indicated in the picture given here. So, this is the hole, lower limit of hole is 30 millimeter, upper limit of the hole is 30.06 millimeter and we have the shaft with lower limit that is 29.89 millimeter and high limit of shaft is 29.95 millimeter. The difference between the minimum size of shaft and maximum size of hole gives us the maximum clearance and then the difference between the maximum size of the shaft and minimum size of the hole will give us the minimum clearance. So, here we can see some of the preferred hole basis fits as per American standard B 4.2.  That means the lower limit of the hole will be equal to the basic size. Similarly, we have the preferred shafts here C 11 and then D 9, F 7, G 6, H 6. You can see here again we have the basic shaft here wherein the deviation is 0. Now, if you take h 11, C 11 combination you can see that there is a large clearance here. So, this is the minimum size of the shaft hole. So, this is the hole and this is the minimum size of the hole and this gives us the maximum size of the hole and similarly this gives us the minimum, I am sorry. So, this will give us the maximum size of the shaft and this gives the minimum size of the shaft. So, now, the difference between the minimum size of the hole and maximum size of the shaft will give us the minimum clearance and similarly the difference between the maximum hole and the minimum shaft will give us the maximum clearance here. Now for h 7, capital H 7 and lowercase h 6, we can see that the clearance is 0 and from C 11, D 9, F 7, these combinations, these combinations will give us the clearance fit. Similarly, these combinations of hole and shaft will give us, for example, h 7 and 6 will give us transition fit. You can see here there is some overlap here, the tolerance zones of hole and shaft they are overlapping. So, we get the transition fits and then we have the combination h 7, p 6, h 7, h 6, h 7, u 6, all these combinations will give us the interference fits. So, again here, this is the maximum size of the hole and this is the minimum size of the hole and this is the hole tolerance and similarly we have the shaft tolerance. So, this difference will give us minimum interference and this difference that is maximum size of the shaft and then minimum size of the hole. So, this distance will give us the maximum interference and here hole basis system is shown with letters. That means, the h hole is considered here, the basic hole is considered here where deviation is 0. That means, the basic size of the lower limit of the hole. So, this is the lower limit of the hole. So, it is coinciding with the basic size. So, that is why this is the basic hole with letter h and this is the tolerance for the hole and this line indicates the 0 line. Now, we can see that we have varying the shaft sizes. We have A shaft, B shaft, C shaft like this. So, up to h, we can have clearance fit. For example, one example is given here h 7 d 10. So, this is h 7 and then d 10, this will give us the clearance fit and then the other combinations like h 7 j k m n p up to this, we can have the transition fit. One example is given here h 7 m 6. So, this will provide us the transition fit. Similarly, these combinations R, S, T, U, V, X, Y, Z, Z, A, Z, B, Z, C, these shafts with h hole will give us interference fit. So, depending upon the application, we can select appropriate fit. Now, this is the graphical representation of the shaft basis system as per NCB 4.2. Now, you can see here the shafts are basic shafts. That means the deviation in this case is 0. That means upper size of the shaft is coinciding with the basic size. Hence, the deviation is 0. Now, we have various shafts h 11, h 9, different grades of tolerance that is the different IT grades or as the number increases, as the IT grade number increases, we can see that the tolerance value will increase. As the number reduces, the tolerance band is reducing. That means as they move, as we decrease the IT grades from h 11, 9, 7, 6 like this, we have to select the precision machine tools to control the sizes properly to provide the tight tolerances. So, when the tolerance grade increases like IT 8, 9, 10 like that, the tolerance gets widened so that we can select not so precision machine tools and the cost of production will decrease. Again the selection of fit and tolerance, it depends upon the application that is needed. Similarly, we have, we are varying the shaft sizes here C, D, F, G, H.  That means the lower size of the hole is coinciding with the basic size. And this 11 indicates the IT grade, IT 11, IT 9, IT 8. As the number decreases, tolerance band reduces. As the number increases, tolerance band increases. So, for this particular IT 11, this is the hole tolerance and for this H 11, this is the shaft tolerance and you can see there is a wide gap between the C shaft and H shaft and C hole and this is the minimum clearance what we can get. And this corresponds to the maximum size of the hole and this corresponds to the minimum size of the shaft. So, this will give us the maximum clearance. And as we move towards right side, you can see here the hole sizes are lesser than the shaft size. So, we are getting interference. For example, we have this hole U7 and this is the maximum size of the hole and this is the minimum size of the hole and this is the tolerance, hole tolerance. And this is the H6 is the shaft wherein we have the shaft tolerance. This is the shaft tolerance and this is the maximum size of the shaft and this corresponds to the minimum size of the shaft. And now, the minimum size of the shaft is greater than the maximum size of the hole. Hence, we are getting the interference fit. Now, this is the minimum amount of interference and this gives us the maximum amount of interference. And again depending upon the what type of holes and shaft combination we get, we have we can get the clearance fit, transition fit and interference fit. Now, this is ANSI preferred shaft basis fits as per ANSI B 4.2. Now, we have taken the basic shaft and where the shaft size is fixed and this is the tolerance provided for the shaft. Now, this is the basic line zero line. It is corresponding to the basic size of the shaft. So, the deviation is zero. Hence, this is the basic shaft and then we have the shaft basis fits. Now, we are varying the holes, hole sizes we are varying. This is A hole, B hole with the tolerance zone. Now, from A to H, we can get the clearance fit. So, H6 D 10. So, this shaft is H shaft and 6 is the 80 grade. H6 D 10 will give us the clearance fit. And from J to P with H shaft will give us the transition fit and then from R, R hole to ZC with the H shaft we can get interference fit. Now, this is a description of preferred fits, a summary of preferred fits. Clearance fit, transition fit and interference fit and depending upon what type of fit required, whether we require loose running fit or free running fit or closed running fit, sliding fit, locational clearance fit. So, depending upon the type of fit, whether we want clearance fit or transition fit or interference fit, we can select the appropriate combinations and these combinations are the preferred fits. And these combinations H 11, C 11, they give more clearance and H 7, U 6, U 7, H 6, they give the more interference. Now, this table shows preferred hole basis metric clearance fits as per ANSI B 4.2. Now, we can understand, this is a readymade table depending upon the type of fit required, we can select the appropriate fits. Basic sizes are given here 1, 1.2, 1.6, 1.62 like this up to 500 millimeter. The basic sizes are given with the maximum value of the maximum value and minimum for both shaft and hole, they are mentioned here. And we have loose running fit, if we want loose running fit, what is the combination we should select. If we want free running fit, what combination we can select, all those things we can get here. And for example, if the basic size is 20 and if we select H 11 hole, then the hole minimum size will be 20, since it is H hole, the deviation is 0. So, the minimum size of the hole will be equal to the basic size. So, minimum size is 20 millimeter and maximum size will be equal to 20.130.  Similarly, depending upon the type of fit required, we can select the locational clearance, sliding clearance etcetera, etcetera. And one more thing we can understand is as the number is reducing H 11, H 9, H 8, H 7, the amount of tolerance also reduces. For example, here for H 11 20 basic size, the tolerance for the hole is 130 microns. Whereas, for the same basic size, if we select H 9 hole that is IT grade, IT 9 tolerance grade, we can see the tolerance is reduced to 52 microns from 130 micrometers. And then if we go to H 8 hole, we can see the tolerance becomes 33 micrometers. And for H 7 hole, with the same basic size of 20 millimeter, we have the tolerance of 21 microns. So, as the IT grade number reduces, the tolerance becomes tight. Now, this table, it gives the basic size from 30 millimeter to 500 millimeters. Similarly, we can have ready made tables in the ANSI standard for hole basis metric transition at the interference phase and then the shaft basis metric clearance phase, shaft basis metric transition and interference phase. So, one can get the ready made tables from the standard and can use it. Now, this table 4, it gives the formula for fundamental deviation for shafts, shaft sizes up to 500 millimeter. So, depending upon the shaft destination, whether we are using A shaft, B shaft, C shaft, etcetera, etcetera. What is the upper deviation and what is the lower deviation? So, that we can find in micrometers. For example, if I select the shaft D, the upper deviation will be equal to minus 16 times D power of 0.44 micrometer, where D is in millimeter. So, like this, using this table, one can find the formula for the fundamental deviation. Now, this table shows the various grades of tolerances used as per IS 919 standard. So, these are the tolerance grades IT5, IT6 and IT2, IT16 and the second row indicates the values of the tolerance values in terms of tolerance unit, international tolerance unit I. Now, this table gives us 18 grades of tolerances as per IS 919. Now, also this table gives the field of use of these grades. For example, IT01, IT0, IT1 up to IT6, these grades are used for limit gauges and measuring instruments wherein very tight tolerances are specified and IT5 to IT12, they are used for precision and general engineering fits like the bush bearing and then for fitting the bearings in the housings, for fitting the pulleys on to the shaft, etc., etc. And IT11 to IT16, they are used for semi-finished products. Now, how do we designate the holes and shafts? And the combination of hole and shaft is shown here. So, this is the way in which the hole is designated, this 50H8. So, here this first number 50 indicates the basic size of the hole and then H indicates the fundamental, this letter indicates the fundamental deviation. For H whole, the fundamental deviation is 0 that we have already studied and this number 8 indicates the IT grade. So, this dictates as what is the tolerance that is allowed on the hole. Similarly, for the shaft, this 50 indicates the basic size in the millimeter and F indicates the fundamental deviation for F whole and 7 indicates the IT grade. So, IT grade 7, using this we can find what is the tolerance. And then for the combination of hole and shaft that is for fit, this is how we represent the fit. This number indicates the basic size of hole and shaft. This indicates what is the type of hole. This 8 is IT grade for hole and this small f, this is for shaft. So, 7 indicates the international tolerance grade. Now, so tolerance zone for H shaft. So, H shaft is considered here, wherein the deviation, fundamental deviation is 0. Now, for H shaft, various tolerance grades are shown here like 5, IT 5, IT 6, IT 7 up to 11, IT 5 to IT 11. Now, as the number increases, IT number increases, the tolerance value will also increase. You can see here for IT 5, this is the amount of tolerance. For IT 6, this is the amount of tolerance. IT 11, you can see we have a very large tolerance of 160 microns. And this tolerance value, it also depends upon what is the basic size. So, this particular picture is drawn for a basic size of 50 millimeter with H shaft and with IT grade, IT 5 to IT 11. So, these numbers indicate the tolerance. Now, we can see here for H 6, this is the amount of tolerance. So, from here to this, this is 20 micrometer tolerance. So, this will be, this is 10 micron and then this is 15 micron. So, this tolerance value will be approximately 16 or 17 microns. So, that we can check with the table 3. H 6, 50 millimeter basic size, 50 H 6, 50 is the basic size. So, basic size is 50 millimeter and H 6 is the hole. We have H 6 here. Now, since we are using basic shaft, the deviation is 0. That means the maximum size of the shaft is equal to the basic size, that is 50 millimeter. And we can see here, the minimum size of the shaft is 49.984. So, the difference between these two is 16 microns. So, this 16 microns is the tolerance provided on the shaft. So, that we can observe in this picture. 16 microns is the tolerance. So, we can use the readymade graphs like this or readymade tables for getting the tolerance value. Now, we have to calculate the international tolerance grades depending upon what is the grade that is provided, whether it is I T 5, I T 6 or I T 16 like that. Depending upon this, we have to find the standard tolerance unit. For that, we use the formulae that is given here. I, that is standard tolerance unit is equal to 0.45 times cube root of D plus 0.001 times D, where D is the geometric mean of the diameter step. So, what is the diameter of diameter step? We can understand from this. D is millimeter. It is the geometric mean of lower diameter and upper diameter. That means, you can see here, this table gives geometric mean of diameter steps, various steps that are allowed as per standard. So, 0 to 3 is one step, 6 to 10 is another diameter step. So, this is D 1. First number is D 1 and second number is D 2. So, if we have diameter of 25, it falls within this step of 18 to 30 millimeter. Then, D 1 becomes 18 millimeter and D 2 will be 30 millimeter. Then, using this relationship, we can find the geometric mean D. Now, this particular picture shows the various machining processes and associated I T grades. Now, we can see here, different processes are listed here. So, starting from very precise machining like lapping, honing, etcetera, super finishing, cylindrical grinding, diamond turning and then very not so precision operations like drilling, die casting, forging, etcetera, etcetera. Now, when we say I T grade 5, immediately we can select what is the process which is suitable for the, to produce that I T 5 grade. You can see here, if we say I T 5, then we have so many machining operations which can satisfy the tolerance values specified by I T 5. We can select honing, super finishing, reaming like this. So, the fine machining processes we have to select. If we say I T 10, then these are the machining processes we can select to get the tolerance value which is specified by I T 10. The processes like boring, sawing, milling, etcetera, we have to. So, that means when the designer says the particular I T grade, immediately we can use this table and we can find what is the appropriate machining operation. Now, we will conclude at this point. In this lecture, we studied about the various tables, readymade tables and charts, using which we can find the tolerance values to find the upper limit and lower limit of shaft and holes and then we studied about the different I T grades and what are the applicable machining processes suitable for various I T grades. In the next lecture, we will continue with some numerical problems. Thank you.


Sad to know where all the best toys are and this December many of the hunter's smartphones are just a penny with service in Appalachian Wireless. Stop by your local Appalachian Wireless to check out all of the great smartphone deals that consistently top the nice lists. Ho ho, this Christmas is truly going to be bigger and better than ever. Better service, bigger savings, that is. Ho ho ho ho ho! That's today's Appalachian Wireless! As winter weather season approaches, Kentucky Emergency Management and the National Weather Service are reminding residents across the state to be prepared for winter weather emergencies. As December 1st through the 7th has been designated Winter Weather Awareness Week and even on the local level, emergency management officials are urging people to realize winter weather is just around the corner. You're going to have times when we have winter storm watches and warnings and things of that nature. Pay attention to those. Pike County Emergency Management Director Doug Tackett says in a county as large as Pike County weather conditions can vary from one side to the other.  That accounts for about 38 stations county wide. Some of them have multiple stations. So we get information from those guys through these storms and these bad weather events as what's going on in their area and their road conditions and stuff. And that's how we keep up with what's going on around the county. And when winter weather does hit, Tackett says his office will notify local radio and television stations when information needs to be shared as well as utilizing social media. And we also share whatever Jackson puts on their Facebook on our Facebook page, Pike County Emergency Management. Plus we post the forecast and hazardous weather outlook every day. And any other information we find that's helpful to people, we try to post that and keep it up for several days. This week families throughout Kentucky are encouraged to review their emergency plans and build or resupply their emergency kits. Because officials say it's not a matter of if, but when. I plan ahead and be ready to take it on when it comes. Because folks it's coming. We don't know when, but it will. Reporting in Pikeville for EKB News, I'm Shannon Deskins.